|
1 | | -/* |
| 1 | +/* |
2 | 2 | * Tailwind v4 configuration with Nuxt UI v3 |
3 | 3 | * Using scoped selectors to prevent breaking Unraid WebGUI |
4 | 4 | */ |
|
17 | 17 | @source "../**/*.{vue,ts,js,tsx,jsx}"; |
18 | 18 | @source "../../../unraid-ui/src/**/*.{vue,ts,js,tsx,jsx}"; |
19 | 19 |
|
20 | | -/* |
| 20 | +/* |
21 | 21 | * Scoped base styles for .unapi elements only |
22 | 22 | * Import Tailwind's preflight into our custom layer and scope it |
23 | 23 | */ |
24 | 24 |
|
25 | 25 | @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 | | - } |
| 26 | + /* Scope Tailwind preflight so Nuxt UI components get default browser resets */ |
| 27 | + @import "tailwindcss/preflight.css"; |
39 | 28 |
|
40 | 29 | /* Accessible focus styles for keyboard navigation */ |
41 | 30 | .unapi button:focus-visible { |
42 | 31 | outline: 2px solid #ff8c2f; |
43 | 32 | outline-offset: 2px; |
44 | 33 | } |
45 | 34 |
|
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 | 35 | /* Ensure Nuxt UI modal/slideover close buttons work properly */ |
56 | 36 | .unapi [role="dialog"] button, |
57 | 37 | .unapi [data-radix-collection-item] button { |
58 | | - margin: 0 !important; |
59 | | - background: transparent !important; |
60 | | - border: none !important; |
| 38 | + margin: 0; |
| 39 | + background: transparent; |
| 40 | + border: none; |
61 | 41 | } |
62 | 42 |
|
63 | 43 | /* Focus styles for dialog buttons */ |
|
95 | 75 | padding-inline-start: 0; |
96 | 76 | list-style-type: none; |
97 | 77 | } |
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 | 78 | } |
130 | 79 |
|
131 | 80 | /* Override link styles inside .unapi */ |
|
0 commit comments