From 77cfc07ddab05bfdd3cabb3373f9fe60f74af177 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Thu, 4 Sep 2025 14:36:25 -0400 Subject: [PATCH] refactor: enhance CSS structure with @layer for component styles (#1660) - Introduced @layer directive to ensure base styles have lower priority than Tailwind utilities. - Organized CSS resets for box-sizing, figures, headings, paragraphs, and unordered lists under a single @layer base block for improved maintainability. These changes streamline the CSS structure and enhance compatibility with Tailwind CSS utilities. ## Summary by CodeRabbit - Style - Wrapped core resets in a base style layer, adjusting cascade with utility classes. - Applied global box-sizing within the base layer. - Consolidated heading and paragraph resets into the layer. - Added a reset for unordered lists to remove default bullets and padding. - Retained the logo figure reset within the layer. - Updated formatting and header comments to reflect the layering approach. --- @tailwind-shared/unraid-theme.css | 21 ++++ unraid-ui/src/forms/ObjectArrayField.vue | 4 +- web/assets/main.css | 125 ++++++++++++----------- web/components/ApiKey/ApiKeyCreate.vue | 2 +- web/components/ApiKeyAuthorize.ce.vue | 2 +- 5 files changed, 93 insertions(+), 61 deletions(-) diff --git a/@tailwind-shared/unraid-theme.css b/@tailwind-shared/unraid-theme.css index e3bebc2cf..a2c1acc34 100644 --- a/@tailwind-shared/unraid-theme.css +++ b/@tailwind-shared/unraid-theme.css @@ -167,6 +167,27 @@ --max-width-800px: 800px; --max-width-1024px: 1024px; + /* Container sizes adjusted for 10px base font size (1.6x scale) */ + --container-xs: 32rem; + --container-sm: 38.4rem; + --container-md: 44.8rem; + --container-lg: 51.2rem; + --container-xl: 57.6rem; + --container-2xl: 67.2rem; + --container-3xl: 76.8rem; + --container-4xl: 89.6rem; + --container-5xl: 102.4rem; + --container-6xl: 115.2rem; + --container-7xl: 128rem; + + /* Extended width scale for max-w-* utilities */ + --width-5xl: 102.4rem; + --width-6xl: 115.2rem; + --width-7xl: 128rem; + --width-8xl: 140.8rem; + --width-9xl: 153.6rem; + --width-10xl: 166.4rem; + /* Animations */ --animate-mark-2: mark-2 1.5s ease infinite; --animate-mark-3: mark-3 1.5s ease infinite; diff --git a/unraid-ui/src/forms/ObjectArrayField.vue b/unraid-ui/src/forms/ObjectArrayField.vue index a06f636f0..e9eabd99e 100644 --- a/unraid-ui/src/forms/ObjectArrayField.vue +++ b/unraid-ui/src/forms/ObjectArrayField.vue @@ -241,7 +241,9 @@ const updateItem = (index: number, newValue: unknown) => {
-

No {{ itemTypeName.toLowerCase() }}s configured

+

+ No {{ itemTypeName.toLowerCase() }}s configured +