Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions @tailwind-shared/unraid-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
--color-primary-900: #7c2d12;
--color-primary-950: #431407;

/* Header colors */
--color-header-text-primary: #1c1c1c;
--color-header-text-secondary: #999999;
--color-header-background: #f2f2f2;
/* Header colors - defaults will be overridden by theme */
--color-header-text-primary: var(--header-text-primary, #1c1c1c);
--color-header-text-secondary: var(--header-text-secondary, #999999);
--color-header-background: var(--header-background-color, #f2f2f2);

/* Legacy colors - defaults (overridden by theme-variants.css) */
--color-alpha: #ff8c2f;
Expand Down
32 changes: 12 additions & 20 deletions web/src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
* Using scoped selectors to prevent breaking Unraid WebGUI
*/

/* Import all dependencies at root level */
@import "tailwindcss";
/* Define custom layers with controlled cascade */
@layer theme, unapi-base, components, utilities;

/* Import theme and utilities only - no global preflight */
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities);
@import "@nuxt/ui";
@import 'tw-animate-css';
@import '../../../@tailwind-shared/index.css';
Expand All @@ -14,26 +18,14 @@
@source "../../../unraid-ui/src/**/*.{vue,ts,js,tsx,jsx}";

/*
* Override Tailwind's global resets to only apply within .unapi
* We use high-specificity selectors to counteract Tailwind's global styles
* Scoped base styles for .unapi elements only
* Import Tailwind's preflight into our custom layer and scope it
*/

@layer base {
/* Neutralize Tailwind's global resets for non-.unapi elements */
body *:not(.unapi *) {
all: revert-layer;
}

/* Reapply Tailwind-like resets only within .unapi */
.unapi *,
.unapi *::before,
.unapi *::after {
box-sizing: border-box;
border-width: 0;
border-style: solid;
border-color: theme('borderColor.DEFAULT', currentColor);
margin: 0;
padding: 0;
@layer unapi-base {
/* Scope all Tailwind preflight styles to .unapi */
.unapi {
@import "tailwindcss/preflight.css";
}

/* Override Unraid's button styles for Nuxt UI components */
Expand Down
Loading