|
155 | 155 | } |
156 | 156 | } |
157 | 157 |
|
158 | | -/* Keep icon masks visible when Windows forced colors overrides theme tokens. */ |
| 158 | +/* |
| 159 | + * Forced Colors Mode (WHCM) Override for Icons |
| 160 | + * |
| 161 | + * By default, `forced-color-adjust: preserve-parent-color` (from UnoConfig) works fine |
| 162 | + * for most icons as they inherit the correct text color. |
| 163 | + * |
| 164 | + * However, if icons disappear in specific contexts (e.g., inside buttons with |
| 165 | + * complex backgrounds or transparent states), uncomment the following block |
| 166 | + * to enforce visibility using `CanvasText`. |
| 167 | + */ |
| 168 | +/* |
159 | 169 | @media (forced-colors: active) { |
160 | | - :where([class^='i-'], [class*=' i-']) { |
161 | | - forced-color-adjust: none; |
162 | | - color: CanvasText; |
163 | | - } |
164 | | - |
165 | | - /* Settings page: keep accent/background radio swatches visible in forced colors. */ |
166 | | - :where( |
167 | | - fieldset:has(input[type='radio'][name='accent-color']), |
168 | | - fieldset:has(input[type='radio'][name='background-theme']) |
169 | | - ) |
170 | | - > label { |
171 | | - forced-color-adjust: none; |
172 | | - border: 1px solid CanvasText; |
173 | | - } |
174 | | - |
175 | | - :where( |
176 | | - fieldset:has(input[type='radio'][name='accent-color']), |
177 | | - fieldset:has(input[type='radio'][name='background-theme']) |
178 | | - ) |
179 | | - > label:has(> input:checked) { |
180 | | - outline: 2px solid Highlight; |
181 | | - outline-offset: 2px; |
182 | | - } |
183 | | - |
184 | | - /* Settings page: make toggle tracks and thumb visible in forced colors. */ |
185 | | - button[role='switch'] > span:last-of-type { |
186 | | - forced-color-adjust: none; |
187 | | - } |
188 | | - |
189 | | - button[role='switch'][aria-checked='false'] > span:last-of-type { |
190 | | - background: Canvas; |
191 | | - border-color: CanvasText; |
192 | | - } |
193 | | - |
194 | | - button[role='switch'][aria-checked='false'] > span:last-of-type > span { |
195 | | - background: CanvasText; |
196 | | - } |
197 | | - |
198 | | - button[role='switch'][aria-checked='true'] > span:last-of-type { |
199 | | - background: Highlight; |
200 | | - border-color: Highlight; |
201 | | - } |
202 | | - |
203 | | - button[role='switch'][aria-checked='true'] > span:last-of-type > span { |
204 | | - background: HighlightText; |
205 | | - } |
206 | | - |
207 | | - /* Homepage tag dots are custom spans, not list markers. */ |
208 | | - :where([class~='bg-accent'][class~='rounded-full'][class~='w-1'][class~='h-1']) { |
209 | | - forced-color-adjust: none; |
210 | | - background: CanvasText; |
| 170 | + [class^='i-'], |
| 171 | + [class*=' i-'] { |
| 172 | + forced-color-adjust: none !important; |
| 173 | + color: CanvasText !important; |
211 | 174 | } |
212 | 175 | } |
| 176 | +*/ |
213 | 177 |
|
214 | 178 | html { |
215 | 179 | -webkit-font-smoothing: antialiased; |
|
0 commit comments