diff --git a/src/pages/docs/hover-focus-and-other-states.mdx b/src/pages/docs/hover-focus-and-other-states.mdx index dc7ea6ff0..a0b13321b 100644 --- a/src/pages/docs/hover-focus-and-other-states.mdx +++ b/src/pages/docs/hover-focus-and-other-states.mdx @@ -986,6 +986,30 @@ Tailwind also includes a `motion-safe` modifier that only adds styles when the u ``` +### Prefers reduced transparency + +The `prefers-reduced-transparency` media query tells you if the user has requested that you minimize transparency. + +Use the `transparency-reduce` modifier to conditionally add styles when the user has requested reduced transparency: + +```html {{ example: { hint: 'Try emulating `prefers-reduced-transparency: reduce` in your developer tools to increase the opacity' } }} +
+
+
+
+ +
+
+
+
+``` + +```html +
+ +
+``` + ### Prefers contrast The `prefers-contrast` media query tells you if the user has requested more or less contrast. @@ -1020,6 +1044,46 @@ Use the `contrast-more` modifier to conditionally add styles when the user has r Tailwind also includes a `contrast-less` modifier you can use to conditionally add styles when the user has requested less contrast. +Tailwind also includes a `contrast-custom` modifier you can use to conditionally add styles when the user has requested a custom contrast level. +This can be useful alongside `forced-colors`. + +### Forced colors + +The `forced-colors` media query tells you if the user has forced a specific color palette. + +Use the `forced-colors` modifier to conditionally add styles when this media query is active. + +### Inverted colors + +The `inverted-colors` media query tells you if the user has inverted the colors of their display. + +Use the `inverted-colors` modifier to conditionally add styles when this media query is active: + +```html +
+ +
+``` + +### Scripting + +The `scripting` media query tells you if the user has disabled JavaScript or not. + +Use the `noscript` modifier to conditionally add styles when JavaScript is disabled, or `scripting` when it's enabled: + +```html +
+
+ +
+
+

+ This experience requires JavaScript to function. Please enable JavaScript. +

+
+
+``` + ### Viewport orientation Use the `portrait` and `landscape` modifiers to conditionally add styles when the viewport is in a specific orientation: