Emulate CSS media features

Sofia Emelianova
Sofia Emelianova

Emulate various CSS media features with this reference of emulation options on theRendering tab.

Emulate CSS media featureprefers-color-scheme

Theprefers-color-scheme CSS media feature indicates if the user prefers light or dark color scheme.

To emulate this condition:

  1. On theprefers-color-scheme page,open theRendering tab.
  2. Under theEmulate CSS media featureprefers-color-scheme, select one of the following from the drop-down list:

    • No emulation
    • prefers-color-scheme:light
    • prefers-color-scheme:dark
  3. Reload the page. For example:

Emulated prefers-color-scheme:dark

Emulate CSS media type (Enable print preview)

Theprint media query controls how your page looks when printed.

To force your page into print preview mode:

  1. Open theRendering tab and underEmulate CSS media type selectprint.

    Print preview mode

  2. From here, you can view and change your CSS, like any other web page. SeeGet Started With Viewing And Changing CSS.

Emulate CSS media featureforced-colors

Theforced-colors CSS media feature indicates if the user agent enabled a forced colors mode. An example of a forced colors mode is Windows High Contrast.

To emulate this condition:

  1. Open theRendering tab.
  2. Under theEmulate CSS media featureforced-colors, select one of the following from the drop-down list:

    • No emulation
    • forced-colors:active
    • forced-colors:none

Withforced-colors:active emulated:

forced-colors:active

Emulate CSS media featureprefers-contrast

Theprefers-contrast CSS media feature indicates if the user requested the web content to present with a higher, lower, or specific contrast value.

To emulate this condition:

  1. Open theRendering tab.
  2. Under theEmulate CSS media featureprefers-contrast, select one of the following from the drop-down list:

    • No emulation
    • prefers-contrast:more
    • prefers-contrast:less
    • prefers-contrast:custom

Emulate CSS media featureprefers-reduced-motion

Theprefers-reduced-motion CSS media feature indicates if the user has requested to minimize the amount of motion on a page.

To emulate this condition:

  1. Open theRendering tab on thisdemo and try scrolling to see various animations.
  2. Under theEmulate CSS media featureprefers-reduced-motion, selectprefers-reduced-motion:reduce.
  3. Try scrolling again.

Emulate CSS media featureprefers-reduced-transparency

Theprefers-reduced-transparency CSS media feature indicates if the user requested to reduce the transparent or translucent layer effects used on the device.

Theprefers-reduced-transparency feature isavailable from Chrome 118 and lets you adapt web content to user-selected preference for reduced transparency in the OS, such as theReduce transparency setting on macOS.

To emulate this condition:

  1. Open theRendering tab.
  2. Under theEmulate CSS media featureprefers-reduced-transparency, selectprefers-reduced-transparency: reduce.
  3. Check if your page displays correctly.

Emulate CSS media featurecolor-gamut

Thecolor-gamut CSS media feature indicates which range of colors the user agent and the output device support.

To emulate this condition:

  1. Open theRendering tab.
  2. Under theEmulate CSS media featurecolor-gamut, select one of the following from the drop-down list:

    • No emulation
    • color-gamut:srgb—approximatelysRGB gamut or more
    • color-gamut:p3—approximately the gamut specified inDisplay P3 Color Space or more
    • color-gamut:rec2020—approximately the gamut specified inRec. 2020 or more

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-04-13 UTC.