Skip to content

Commit

Permalink
Merge prefers-color-scheme / color-scheme / light-dark()
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip committed Aug 7, 2024
1 parent 48fce91 commit 856c940
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 40 deletions.
14 changes: 13 additions & 1 deletion features/color-scheme.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: color-scheme
description: The `color-scheme` CSS property sets which color schemes (light or dark) an element uses and may prevent automatic dark mode adjustments by the browser.
description: The `color-scheme` CSS property sets which color schemes (light or dark) an element uses and may prevent automatic dark mode adjustments by the browser. The `prefers-color-scheme` media query detects the requested color scheme, and the `light-dark()` function accepts two colors and uses one depending on the current color scheme.
spec: https://drafts.csswg.org/css-color-adjust-1/#color-scheme-prop
# `color-scheme: only light` and `color-scheme: only dark` can be used to opt
# out from Chrome's Auto Dark Theme:
Expand All @@ -8,3 +8,15 @@ spec: https://drafts.csswg.org/css-color-adjust-1/#color-scheme-prop
# Including them increases the Baseline low date from 2022-01-11 (Firefox 98) to
# 2022-02-03 (Chrome 98). Since this is less than a month's difference and the
# opt-out could be important for some developers, the later date is accepted.
status:
compute_from:
- css.properties.color-scheme
- css.properties.color-scheme.only_dark
- css.properties.color-scheme.only_light
compat_features:
- css.at-rules.media.prefers-color-scheme
- css.properties.color-scheme
- css.properties.color-scheme.only_dark
- css.properties.color-scheme.only_light
- css.types.color.light-dark
- html.elements.meta.name.color-scheme
25 changes: 25 additions & 0 deletions features/color-scheme.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ status:
safari: "13"
safari_ios: "13"
compat_features:
# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
# support:
# chrome: "76"
# chrome_android: "76"
# edge: "79"
# firefox: "67"
# firefox_android: "67"
# safari: "12.1"
# safari_ios: "13"
- css.at-rules.media.prefers-color-scheme

# baseline: high
# baseline_low_date: 2022-01-11
# baseline_high_date: 2024-07-11
Expand Down Expand Up @@ -54,3 +67,15 @@ compat_features:
# safari_ios: "13"
- css.properties.color-scheme.only_dark
- css.properties.color-scheme.only_light

# baseline: low
# baseline_low_date: 2024-05-13
# support:
# chrome: "123"
# chrome_android: "123"
# edge: "123"
# firefox: "120"
# firefox_android: "120"
# safari: "17.5"
# safari_ios: "17.5"
- css.types.color.light-dark
3 changes: 0 additions & 3 deletions features/light-dark.yml

This file was deleted.

16 changes: 0 additions & 16 deletions features/light-dark.yml.dist

This file was deleted.

3 changes: 0 additions & 3 deletions features/prefers-color-scheme.yml

This file was deleted.

17 changes: 0 additions & 17 deletions features/prefers-color-scheme.yml.dist

This file was deleted.

0 comments on commit 856c940

Please sign in to comment.