CSS forced-color-adjust Property

❮ Previous Reference Next ❯


.box {
  border: 5px solid grey;
  background-color: #ccc;
  width: 300px;
  margin: 20px;
  padding: 10px;

@media (forced-colors: active) {
  .forced {
    forced-color-adjust: none;


The forced-color-adjust CSS property allows authors to opt certain elements out of forced colors mode.

This then restores the control of those values to CSS.

Default value:auto
JavaScript syntax:

Standard Syntax

forced-color-adjust: auto|none|initial|inherit|revert|revert-layer|unset;

Browser Support


Property Values

The following table describes the values of this property:

Value Description
auto This is the default value. The element's colors are adjusted by the user agent in forced colors mode.
none The element's colors are not automatically adjusted by the user agent in forced colors mode.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element animation-delay property.
revert Reverts the cascaded value of the property from its current value to the value the property
revert-layer Rollback styles to the ones specified in previous cascade layers.
unset Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.

Default CSS Property Values

selectors {
  forced-color-adjust: auto;
❮ Previous Reference Next ❯