Skip to content

Commit

Permalink
Re-import css/css-color WPT
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=261895
rdar://115853179

Reviewed by Aditya Keerthi.

Upstream commit: web-platform-tests/wpt@983ffcf

Also re-import css/support to get new color support test file.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/border-color-currentcolor-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/border-color-currentcolor-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/border-color-currentcolor.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-visited-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-visited-getcomputedstyle.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-visited-ref.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-visited.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/currentcolor-004.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/lab-l-over-100-1.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/lab-l-over-100-2.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/lch-005-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/lch-005-ref.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/lch-005.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/oklab-l-over-1-1-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/oklab-l-over-1-1.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/oklab-l-over-1-2-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/oklab-l-over-1-2.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/oklab-l-over-1-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-rgb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-rgb.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-hsl-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-hsl.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-hwb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-hwb.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-relative-color-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-relative-color.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-rgb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-invalid-rgb.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-mix-out-of-gamut-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-mix-out-of-gamut.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-hsl-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-hsl.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-hwb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-hwb.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-rgb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-rgb.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/opacity-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/opacity-valid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/relative-color-out-of-gamut-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/relative-color-out-of-gamut.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-a98rgb-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-a98rgb-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-displayp3-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-displayp3-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-hsl-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-hsl-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-hsl-02-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-hsl-02.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-hwb-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-hwb-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-lab-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-lab-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-lch-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-lch-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-oklab-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-oklab-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-oklch-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-oklch-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-prophoto-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-prophoto-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rec2020-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rec2020-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rec2020-02-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rec2020-02.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rgb-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rgb-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rgb-02-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rgb-02.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-xyzd50-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-xyzd50-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-xyzd65-01-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-xyzd65-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-green-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/relative-rec2020-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-consistency-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-hightlights-vs-getSelection-001-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-hightlights-vs-getSelection-001.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-hightlights-vs-getSelection-002-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-hightlights-vs-getSelection-001-expected.html.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-hightlights-vs-getSelection-002.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-hightlights-vs-getSelection-001.html.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/css/support/color-testcommon.js: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/support/computed-testcommon.js:
(test_computed_value):
* LayoutTests/imported/w3c/web-platform-tests/css/support/interpolation-testcommon.js:
(cssTransitionsInterpolation.interpolate):
(cssTransitionAllInterpolation.interpolate):
(createInterpolationTestTargets):
* LayoutTests/imported/w3c/web-platform-tests/css/support/parsing-testcommon.js:
(test_valid_value):
(test_keyframes_name_valid): Deleted.
* LayoutTests/imported/w3c/web-platform-tests/css/support/w3c-import.log:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-monterey/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function-expected.txt:
* LayoutTests/platform/mac-monterey/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt:

Canonical link: https://commits.webkit.org/268293@main
  • Loading branch information
nt1m committed Sep 22, 2023
1 parent 6c07f7d commit cc7b406
Show file tree
Hide file tree
Showing 98 changed files with 6,462 additions and 2,757 deletions.
28 changes: 23 additions & 5 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -4627,13 +4627,33 @@ webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sam
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-021.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-022.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-023.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-visited-link-initial.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque-cross-origin.sub.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred.html [ ImageOnlyFailure ]

webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/lch-009.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/lch-010.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/oklch-009.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/oklch-010.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-visited-link-initial.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-opaque-cross-origin.sub.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred.html [ ImageOnlyFailure ]
webkit.org/b/261898 imported/w3c/web-platform-tests/css/css-color/oklab-l-over-1-2.html [ ImageOnlyFailure ]

# currentColor support in relative color syntax.
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-a98rgb-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-displayp3-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-hsl-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-hsl-02.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-hwb-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-lab-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-lch-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-oklab-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-oklch-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-prophoto-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rec2020-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rec2020-02.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rgb-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-rgb-02.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-xyzd50-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-xyzd65-01.html [ ImageOnlyFailure ]

webkit.org/b/214456 imported/w3c/web-platform-tests/css/css-images/conic-gradient-angle.html [ ImageOnlyFailure ]
webkit.org/b/214456 imported/w3c/web-platform-tests/css/css-images/conic-gradient-angle-negative.html [ ImageOnlyFailure ]
Expand Down Expand Up @@ -6421,8 +6441,6 @@ webkit.org/b/255101 imported/w3c/web-platform-tests/css/css-backgrounds/box-shad
webkit.org/b/255101 imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html [ ImageOnlyFailure ]
webkit.org/b/255101 imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html [ ImageOnlyFailure ]

imported/w3c/web-platform-tests/css/css-color/system-color-hightlights-vs-getSelection-001.html [ ImageOnlyFailure ]

# Flaky test that sometimes passes and sometimes fails.
imported/w3c/web-platform-tests/screen-orientation/nested-documents.html [ Pass Failure ]

Expand Down
6 changes: 6 additions & 0 deletions LayoutTests/imported/w3c/resources/resource-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -1066,16 +1066,19 @@
"web-platform-tests/css/css-color/background-color-rgb-003-ref.html",
"web-platform-tests/css/css-color/blacksquare-ref.html",
"web-platform-tests/css/css-color/blacktext-ref.html",
"web-platform-tests/css/css-color/border-color-currentcolor-ref.html",
"web-platform-tests/css/css-color/border-color-ref.xht",
"web-platform-tests/css/css-color/color-mix-basic-001-ref.html",
"web-platform-tests/css/css-color/color-mix-currentcolor-001-ref.html",
"web-platform-tests/css/css-color/color-mix-currentcolor-002-ref.html",
"web-platform-tests/css/css-color/color-mix-currentcolor-003-ref.html",
"web-platform-tests/css/css-color/color-mix-currentcolor-nested-for-color-property-ref.html",
"web-platform-tests/css/css-color/color-mix-currentcolor-visited-ref.html",
"web-platform-tests/css/css-color/color-mix-non-srgb-001-ref.html",
"web-platform-tests/css/css-color/color-mix-percents-01-ref.html",
"web-platform-tests/css/css-color/composited-filters-under-opacity-ref.html",
"web-platform-tests/css/css-color/currentcolor-003-ref.html",
"web-platform-tests/css/css-color/currentcolor-004-ref.html",
"web-platform-tests/css/css-color/deprecated-sameas-ButtonBorder-ref.html",
"web-platform-tests/css/css-color/deprecated-sameas-ButtonFace-ref.html",
"web-platform-tests/css/css-color/deprecated-sameas-Canvas-ref.html",
Expand Down Expand Up @@ -1105,6 +1108,7 @@
"web-platform-tests/css/css-color/oklab-005-ref.html",
"web-platform-tests/css/css-color/oklab-006-ref.html",
"web-platform-tests/css/css-color/oklab-007-ref.html",
"web-platform-tests/css/css-color/oklab-l-over-1-ref.html",
"web-platform-tests/css/css-color/oklch-004-ref.html",
"web-platform-tests/css/css-color/oklch-005-ref.html",
"web-platform-tests/css/css-color/oklch-006-ref.html",
Expand All @@ -1115,6 +1119,8 @@
"web-platform-tests/css/css-color/rebeccapurple-ref.html",
"web-platform-tests/css/css-color/rec2020-003-ref.html",
"web-platform-tests/css/css-color/rec2020-004-ref.html",
"web-platform-tests/css/css-color/relative-green-ref.html",
"web-platform-tests/css/css-color/relative-rec2020-ref.html",
"web-platform-tests/css/css-color/srgb-linear-003-ref.html",
"web-platform-tests/css/css-color/srgb-linear-004-ref.html",
"web-platform-tests/css/css-color/t31-color-currentColor-b-ref.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<title>CSS Test Reference</title>
<style>
div {
border-width: 5px;
border-color: green;
color: green;
margin-bottom: 2px;
}
</style>
<p>Test passes if all the border colors are green</p>
<div style="border-style: inset">
inset
</div>
<div style="border-style: outset">
outset
</div>
<div style="border-style: ridge">
ridge
</div>
<div style="border-style: groove">
groove
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<title>CSS Test Reference</title>
<style>
div {
border-width: 5px;
border-color: green;
color: green;
margin-bottom: 2px;
}
</style>
<p>Test passes if all the border colors are green</p>
<div style="border-style: inset">
inset
</div>
<div style="border-style: outset">
outset
</div>
<div style="border-style: ridge">
ridge
</div>
<div style="border-style: groove">
groove
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!doctype html>
<title>`border-color: currentColor` resolves to `color` value</title>
<link rel=help href="https://www.w3.org/TR/css-color-3/#currentcolor">
<link rel=author title="Vitaly Dyachkov" href="mailto:vitaly@igalia.com">
<link rel=match href="border-color-currentcolor-ref.html">
<style>
div {
border-width: 5px;
border-color: currentColor;
color: green;
margin-bottom: 2px;
}
</style>
<p>Test passes if all the border colors are green</p>
<div style="border-style: inset">
inset
</div>
<div style="border-style: outset">
outset
</div>
<div style="border-style: ridge">
ridge
</div>
<div style="border-style: groove">
groove
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html>
<meta charset="utf-8">
<title>currentcolor is taken from :visited pseudo-class correctly in color-mix()</title>
<style>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>color-mix and currentcolor with :visited don't leak information via getComputedStyle</title>
<link rel="help" href="https://drafts.csswg.org/css-color-5/#color-mix">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html>
<meta charset="utf-8">
<title>currentcolor is taken from :visited pseudo-class correctly in color-mix()</title>
<style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
background-color: color-mix(in srgb, currentcolor, white 75%);
}
</style>
<a href=""><span>This background should be green and not red</span></a>
<a href=""><span>This background should be green and not red</span></a>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="match" href="currentcolor-004-ref.html">
<title>currentcolor and visited computed parent color</title>
<link rel="help" href="https://drafts.csswg.org/css-color-5/#color-mix">
<title>currentcolor and visited inherited parent color</title>
<link rel="help" href="https://drafts.csswg.org/css-color-4/#resolving-other-colors">
<link rel="author" title="Matthieu Dubet" href="https://github.com/mdubet">
<style>
a { color: red; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Lab is always clamped to a value between 0 to 100</title>
<link rel="help" href="https://drafts.csswg.org/css-color/#ok-lab">
<link rel="help" href="https://drafts.csswg.org/css-color/#cie-lab">
<link rel="match" href="lab-l-over-100-ref.html">
<meta name="assert" content="lab() with lightness greater than 100">
<style>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Lab is always clamped to a value between 0% to 100%</title>
<link rel="help" href="https://drafts.csswg.org/css-color/#ok-lab">
<link rel="help" href="https://drafts.csswg.org/css-color/#cie-lab">
<link rel="match" href="lab-l-over-100-ref.html">
<meta name="assert" content="lab() with lightness greater than 100%">
<style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<meta charset="utf-8">
<title>CSS Color 4: Specifying Lab and LCH</title>
<style>
.test { background-color: rgb(10.7906% 75.5567% 66.3982%); width: 12em; height: 12em; } /* lch(70% 45 180) converted to sRGB */
.test { background-color: rgb(10.7506% 75.5575% 66.3981%); width: 12em; height: 12em; } /* lch(70% 45 180) converted to sRGB */
</style>
<body>
<p>Test passes if you see a single square, and not two rectangles of different colors.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<meta charset="utf-8">
<title>CSS Color 4: Specifying Lab and LCH</title>
<style>
.test { background-color: rgb(10.7906% 75.5567% 66.3982%); width: 12em; height: 12em; } /* lch(70% 45 180) converted to sRGB */
.test { background-color: rgb(10.7506% 75.5575% 66.3981%); width: 12em; height: 12em; } /* lch(70% 45 180) converted to sRGB */
</style>
<body>
<p>Test passes if you see a single square, and not two rectangles of different colors.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="assert" content="lch() with no alpha, negative a axis (when converted to Lab)">
<style>
.test { background-color: red; width: 12em; height: 6em; margin-top: 0; }
.ref { background-color: rgb(10.7906% 75.5567% 66.3982%); width: 12em; height: 6em; margin-bottom: 0; } /* lch(70% 45 180) converted to sRGB */
.ref { background-color: rgb(10.7506% 75.5575% 66.3981%); width: 12em; height: 6em; margin-bottom: 0; } /* lch(70% 45 180) converted to sRGB */
.test { background-color: lch(70% 45 -180); }
</style>
<body>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Lab is always clamped to a value between 0 to 100</title>
<style>
.ref { background-color: oklab(1 0.5 0.2); width: 100px; height: 200px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Oklab is always clamped to a value between 0 to 1</title>
<link rel="help" href="https://drafts.csswg.org/css-color/#ok-lab">
<link rel="match" href="oklab-l-over-1-ref.html">
<meta name="assert" content="oklab() with lightness greater than 1">
<style>
.ref { background-color: oklab(1 0.5 0.2); width: 100px; height: 100px}
/* l = 1.5 should clamp back to 1 */
.test { background-color: oklab(1.5 0.5 0.2); width: 100px; height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Lab is always clamped to a value between 0 to 100</title>
<style>
.ref { background-color: oklab(1 0.5 0.2); width: 100px; height: 200px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Oklab is always clamped to a value between 0% to 100%</title>
<link rel="help" href="https://drafts.csswg.org/css-color/#ok-lab">
<link rel="match" href="oklab-l-over-1-ref.html">
<meta name="assert" content="oklab() with lightness greater than 100%">
<style>
.ref { background-color: oklab(100% 0.5 0.2); width: 100px; height: 100px}
/* l = 150 should clamp back to 100 */
.test { background-color: oklab(150% 0.5 0.2); width: 100px; height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Lab is always clamped to a value between 0 to 100</title>
<style>
.ref { background-color: oklab(1 0.5 0.2); width: 100px; height: 200px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
</body>
Loading

0 comments on commit cc7b406

Please sign in to comment.