|
1 | | -/* |
| 1 | +/* |
2 | 2 | * Tailwind v4 configuration with Nuxt UI v3 |
3 | 3 | * Using scoped selectors to prevent breaking Unraid WebGUI |
4 | 4 | */ |
|
9 | 9 | /* Import theme and utilities only - no global preflight */ |
10 | 10 | @import "tailwindcss/theme.css" layer(theme); |
11 | 11 | @import "tailwindcss/utilities.css" layer(utilities); |
12 | | -@import "@nuxt/ui"; |
| 12 | +@import "@nuxt/ui/.nuxt/ui.css" layer(theme); |
| 13 | +@import "@nuxt/ui"; |
13 | 14 | @import 'tw-animate-css'; |
14 | 15 | @import '../../../@tailwind-shared/index.css'; |
15 | 16 |
|
16 | 17 | /* Scan for Tailwind classes in all source files */ |
17 | 18 | @source "../**/*.{vue,ts,js,tsx,jsx}"; |
18 | 19 | @source "../../../unraid-ui/src/**/*.{vue,ts,js,tsx,jsx}"; |
19 | 20 |
|
20 | | -/* |
| 21 | +/* |
21 | 22 | * Scoped base styles for .unapi elements only |
22 | 23 | * Import Tailwind's preflight into our custom layer and scope it |
23 | 24 | */ |
24 | 25 |
|
25 | 26 | @layer unapi-base { |
26 | | - /* Scope all Tailwind preflight styles to .unapi */ |
27 | | - .unapi { |
28 | | - @import "tailwindcss/preflight.css"; |
29 | | - } |
30 | | - |
31 | | - /* Override Unraid's button styles for Nuxt UI components */ |
32 | | - .unapi button { |
33 | | - /* Reset Unraid's button styles */ |
34 | | - margin: 0 !important; |
35 | | - padding: 0; |
36 | | - border: none; |
37 | | - background: none; |
38 | | - } |
| 27 | + /* Scope Tailwind preflight so Nuxt UI components get default browser resets */ |
| 28 | + @import "tailwindcss/preflight.css"; |
39 | 29 |
|
40 | 30 | /* Accessible focus styles for keyboard navigation */ |
41 | 31 | .unapi button:focus-visible { |
42 | 32 | outline: 2px solid #ff8c2f; |
43 | 33 | outline-offset: 2px; |
44 | 34 | } |
45 | 35 |
|
46 | | - /* Restore button functionality while removing Unraid's forced styles */ |
47 | | - .unapi button:not([role="switch"]) { |
48 | | - display: inline-flex; |
49 | | - align-items: center; |
50 | | - justify-content: center; |
51 | | - cursor: pointer; |
52 | | - transition: all 0.2s; |
53 | | - } |
54 | | - |
55 | 36 | /* Ensure Nuxt UI modal/slideover close buttons work properly */ |
56 | 37 | .unapi [role="dialog"] button, |
57 | 38 | .unapi [data-radix-collection-item] button { |
58 | | - margin: 0 !important; |
59 | | - background: transparent !important; |
60 | | - border: none !important; |
| 39 | + margin: 0; |
| 40 | + background: transparent; |
| 41 | + border: none; |
61 | 42 | } |
62 | 43 |
|
63 | 44 | /* Focus styles for dialog buttons */ |
|
95 | 76 | padding-inline-start: 0; |
96 | 77 | list-style-type: none; |
97 | 78 | } |
98 | | - |
99 | | - /* Reset toggle/switch button backgrounds */ |
100 | | - .unapi button[role="switch"], |
101 | | - .unapi button[role="switch"][data-state="checked"], |
102 | | - .unapi button[role="switch"][data-state="unchecked"] { |
103 | | - background-color: transparent; |
104 | | - background: transparent; |
105 | | - border: 1px solid #ccc; |
106 | | - } |
107 | | - |
108 | | - /* Style for checked state */ |
109 | | - .unapi button[role="switch"][data-state="checked"] { |
110 | | - background-color: #ff8c2f; /* Unraid orange */ |
111 | | - } |
112 | | - |
113 | | - /* Style for unchecked state */ |
114 | | - .unapi button[role="switch"][data-state="unchecked"] { |
115 | | - background-color: #e5e5e5; |
116 | | - } |
117 | | - |
118 | | - /* Dark mode toggle styles */ |
119 | | - .unapi.dark button[role="switch"][data-state="unchecked"], |
120 | | - .dark .unapi button[role="switch"][data-state="unchecked"] { |
121 | | - background-color: #333; |
122 | | - border-color: #555; |
123 | | - } |
124 | | - |
125 | | - /* Toggle thumb/handle */ |
126 | | - .unapi button[role="switch"] span { |
127 | | - background-color: white; |
128 | | - } |
129 | 79 | } |
130 | 80 |
|
131 | 81 | /* Override link styles inside .unapi */ |
|
0 commit comments