![]() ![]() Here is a 1:1 map between the forced-colors keywords and Windows high contrast resource names. There are two default themes to test high contrast, High Contrast Black and High Contrast White. System color example export const ComponentStyles = css`įorced colors and Windows High Contrast themesįorced-colors works with Windows high contrast mode in Windows, located in Ease of Access within Settings. The System Color keywords defined by the CSS Color Module Level 4 specification expose these user-chosen colors.įluent UI Web Components (via FAST components) provides a SystemColors enum to use when setting the color value keywords in a forced-colors stylesheet. In forced-colors mode, the colors on the component are reduced to a limited color palette chosen by the user. Forced-color example export const ComponentStyles = css` Fluent UI Web Components exposes a behavior that conditionally adds and removes stylesheets based on this media query, so forced-colors' stylesheets can then be conditionally applied where necessary. The reason for this behavior is to avoid the runtime cost of applying forced-color style rules when the UA does not match the forced-colors query. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |