From 17728d2fdbf8c6f37ba2df0890fd2fe1d487974d Mon Sep 17 00:00:00 2001 From: "S. MohammadMahdi Zamanian" Date: Wed, 26 Jun 2024 16:35:34 +0330 Subject: [PATCH] fix(styles): gecut layout --- packages/styles/src/css/layout.css | 31 ++++++++++++++++++++++ packages/styles/src/index.css | 21 +-------------- packages/styles/src/plugins/translucent.ts | 6 ++--- 3 files changed, 35 insertions(+), 23 deletions(-) diff --git a/packages/styles/src/css/layout.css b/packages/styles/src/css/layout.css index beed1a4..8400762 100644 --- a/packages/styles/src/css/layout.css +++ b/packages/styles/src/css/layout.css @@ -1,5 +1,36 @@ @layer utilities { .gecut-layout { + * { + @apply select-none; + } + + h1, + h2, + h3, + h4, + h5, + h6, + p, + span, + a, + i, + b, + strong, + em, + code, + kbd, + var, + cite, + dfn, + abbr, + address, + q, + blockquote, + ins, + del { + @apply select-auto; + } + body { main { &.has-top-bar { diff --git a/packages/styles/src/index.css b/packages/styles/src/index.css index a77f6d8..7777c2a 100644 --- a/packages/styles/src/index.css +++ b/packages/styles/src/index.css @@ -6,27 +6,8 @@ @import './css/alpine.css'; @import './css/form.css'; @import './css/scrollbar.css'; +@import './css/layout.css'; @import './css/utilities.css'; @import './css/typography.css'; @import './components/components.css'; - -@layer base { - gecut-root, - .root { - @apply flex flex-col h-full w-full overflow-hidden relative; - } - - main[role='main'] { - @apply flex flex-col flex-1 overflow-hidden relative; - } - - .gecut-page, - .page { - &.scrollable { - @apply overflow-x-auto; - } - - @apply flex flex-col h-full gap-2; - } -} diff --git a/packages/styles/src/plugins/translucent.ts b/packages/styles/src/plugins/translucent.ts index 6ff98e8..38f49c7 100644 --- a/packages/styles/src/plugins/translucent.ts +++ b/packages/styles/src/plugins/translucent.ts @@ -2,10 +2,10 @@ import plugin from 'tailwindcss/plugin.js'; export const translucentPlugin = plugin(({addUtilities}) => { addUtilities({ - '@supports (backdrop-filter: blur(20px))': { + '@supports (backdrop-filter: blur(0.75rem))': { '.translucent': { - '--tw-bg-opacity': '0.8 !important', - 'backdrop-filter': 'saturate(180%) blur(20px)', + '--tw-bg-opacity': '0.7 !important', + 'backdrop-filter': 'saturate(120%) blur(0.75rem)', }, }, });