Skip to content

[css-color-5] What is the computed value of light-dark(none, none)? #13866

@lilles

Description

@lilles

The spec says that none in light-dark() produces a fully transparent image equivalent to linear-gradient(transparent), but for properties which do not accept none or where none means something else than a transparent image, a computed value of none will not round-trip.

Examples:

list-style-image:

list-style-image: light-dark(none, none); /* replaces the marker */
list-style-image: none; /* does not replace the marker */

Registered syntax <image>:

@property --img {
  syntax: "<image>";
  inherits: false;
  initial-value: linear-gradient(transparent);
}

.transparent {
  --img: light-dark(none, none); /* valid */
}
.none {
  --img: none; /* invalid */
}

What should be the computed value of light-dark(none, none)?

@tabatkins @CGQAQ

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions