Skip to content

Commit 71b7cfe

Browse files
authored
Bug 1996318 - Add display-p3-linear color-space to css color(). (#411)
* Bug 1996318 - Add display-p3-linear color-space to css color(). r=#style,tlouw It's display-p3 without gamma encoding. cssparser change will obviously go upstream. Differential Revision: https://phabricator.services.mozilla.com/D270012 * Bump MSRV to 1.68 to deal with syn.
1 parent 03f982e commit 71b7cfe

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- nightly
1919
- beta
2020
- stable
21-
- 1.66.0
21+
- 1.68.0
2222
features:
2323
-
2424
- --features dummy_match_byte

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme = "README.md"
1010
keywords = ["css", "syntax", "parser"]
1111
license = "MPL-2.0"
1212
edition = "2018"
13-
rust-version = "1.66"
13+
rust-version = "1.68"
1414

1515
exclude = ["src/css-parsing-tests/**", "src/big-data-url.css"]
1616

src/color.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ pub enum PredefinedColorSpace {
8585
SrgbLinear,
8686
/// <https://drafts.csswg.org/css-color-4/#predefined-display-p3>
8787
DisplayP3,
88+
/// <https://drafts.csswg.org/css-color-4/#predefined-display-p3-linear>
89+
DisplayP3Linear,
8890
/// <https://drafts.csswg.org/css-color-4/#predefined-a98-rgb>
8991
A98Rgb,
9092
/// <https://drafts.csswg.org/css-color-4/#predefined-prophoto-rgb>
@@ -107,6 +109,7 @@ impl PredefinedColorSpace {
107109
"srgb" => Self::Srgb,
108110
"srgb-linear" => Self::SrgbLinear,
109111
"display-p3" => Self::DisplayP3,
112+
"display-p3-linear" => Self::DisplayP3Linear,
110113
"a98-rgb" => Self::A98Rgb,
111114
"prophoto-rgb" => Self::ProphotoRgb,
112115
"rec2020" => Self::Rec2020,
@@ -126,6 +129,7 @@ impl ToCss for PredefinedColorSpace {
126129
Self::Srgb => "srgb",
127130
Self::SrgbLinear => "srgb-linear",
128131
Self::DisplayP3 => "display-p3",
132+
Self::DisplayP3Linear => "display-p3-linear",
129133
Self::A98Rgb => "a98-rgb",
130134
Self::ProphotoRgb => "prophoto-rgb",
131135
Self::Rec2020 => "rec2020",

0 commit comments

Comments
 (0)