Skip to content

Commit

Permalink
Add borders to (ok)lab L over 100% tests
Browse files Browse the repository at this point in the history
Also make the boxes square to make it easier to describe the expected
rendering.
  • Loading branch information
foolip authored and svgeesus committed Mar 16, 2024
1 parent 6018167 commit 2951eb2
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 49 deletions.
13 changes: 8 additions & 5 deletions css/css-color/lab-l-over-100-1.html
Expand Up @@ -5,13 +5,16 @@
<link rel="match" href="lab-l-over-100-ref.html">
<meta name="assert" content="lab() with lightness greater than 100">
<style>
.ref { background-color: lab(100 150 20); width: 100px; height: 100px}
.square { border: 1px solid black; width: 200px; height: 200px}
.ref { background-color: lab(100 150 20); height: 100px}
/* l = 150 should clamp back to 100 */
.test { background-color: lab(150 150 20); width: 100px; height: 100px}
.test { background-color: lab(150 150 20); height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="square">
<div class="ref"></div>
<div class="test"></div>
</div>
</body>
13 changes: 8 additions & 5 deletions css/css-color/lab-l-over-100-2.html
Expand Up @@ -5,13 +5,16 @@
<link rel="match" href="lab-l-over-100-ref.html">
<meta name="assert" content="lab() with lightness greater than 100%">
<style>
.ref { background-color: lab(100% 150 20); width: 100px; height: 100px}
.square { border: 1px solid black; width: 200px; height: 200px}
.ref { background-color: lab(100% 150 20); height: 100px}
/* l = 150 should clamp back to 100 */
.test { background-color: lab(150% 150 20); width: 100px; height: 100px}
.test { background-color: lab(150% 150 20); height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="square">
<div class="ref"></div>
<div class="test"></div>
</div>
</body>
4 changes: 2 additions & 2 deletions css/css-color/lab-l-over-100-ref.html
Expand Up @@ -2,10 +2,10 @@
<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: lab(100 150 20); width: 100px; height: 200px}
.ref { background-color: lab(100 150 20); border: 1px solid black; width: 200px; height: 200px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="ref"></div>
</body>
13 changes: 8 additions & 5 deletions css/css-color/lch-l-over-100-1.html
Expand Up @@ -5,13 +5,16 @@
<link rel="match" href="lch-l-over-100-ref.html">
<meta name="assert" content="lch() with lightness greater than 100">
<style>
.ref { background-color: lch(100 150 20); width: 100px; height: 100px}
.square { border: 1px solid black; width: 200px; height: 200px}
.ref { background-color: lch(100 150 20); height: 100px}
/* l = 150 should clamp back to 100 */
.test { background-color: lch(150 150 20); width: 100px; height: 100px}
.test { background-color: lch(150 150 20); height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="square">
<div class="ref"></div>
<div class="test"></div>
</div>
</body>
13 changes: 8 additions & 5 deletions css/css-color/lch-l-over-100-2.html
Expand Up @@ -5,13 +5,16 @@
<link rel="match" href="lch-l-over-100-ref.html">
<meta name="assert" content="lch() with lightness graeter than 100%">
<style>
.ref { background-color: lch(100% 150 20); width: 100px; height: 100px}
.square { border: 1px solid black; width: 200px; height: 200px}
.ref { background-color: lch(100% 150 20); height: 100px}
/* l = 150% should clamp back to 100% */
.test { background-color: lch(150% 150 20); width: 100px; height: 100px}
.test { background-color: lch(150% 150 20); height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="square">
<div class="ref"></div>
<div class="test"></div>
</div>
</body>
5 changes: 2 additions & 3 deletions css/css-color/lch-l-over-100-ref.html
Expand Up @@ -2,11 +2,10 @@
<meta charset="utf-8">
<title>CSS Color 4: Specifying LCH with lightness over 100</title>
<style>
.ref { background-color: lch(100 150 20); width: 100px; height: 200px}
.ref { background-color: lch(100 150 20); border: 1px solid black; width: 200px; height: 200px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="ref"></div>
<div class="test"></div>
</body>
13 changes: 8 additions & 5 deletions css/css-color/oklab-l-over-1-1.html
Expand Up @@ -5,13 +5,16 @@
<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}
.square { border: 1px solid black; width: 200px; height: 200px}
.ref { background-color: oklab(1 0.5 0.2); height: 100px}
/* l = 1.5 should clamp back to 1 */
.test { background-color: oklab(1.5 0.5 0.2); width: 100px; height: 100px}
.test { background-color: oklab(1.5 0.5 0.2); height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="square">
<div class="ref"></div>
<div class="test"></div>
</div>
</body>
13 changes: 8 additions & 5 deletions css/css-color/oklab-l-over-1-2.html
Expand Up @@ -5,13 +5,16 @@
<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}
.square { border: 1px solid black; width: 200px; height: 200px}
.ref { background-color: oklab(100% 0.5 0.2); height: 100px}
/* l = 150 should clamp back to 100 */
.test { background-color: oklab(150% 0.5 0.2); width: 100px; height: 100px}
.test { background-color: oklab(150% 0.5 0.2); height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="square">
<div class="ref"></div>
<div class="test"></div>
</div>
</body>
5 changes: 3 additions & 2 deletions css/css-color/oklab-l-over-1-ref.html
Expand Up @@ -2,10 +2,11 @@
<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}
.ref { background-color: oklab(1 0.5 0.2); border: 1px solid black; width: 200px; height: 200px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="ref"></div>
</body>

13 changes: 8 additions & 5 deletions css/css-color/oklch-l-over-1-1.html
Expand Up @@ -5,13 +5,16 @@
<link rel="match" href="oklch-l-over-1-ref.html">
<meta name="assert" content="oklch() with lightness greater than 1">
<style>
.ref { background-color: oklch(1 0.5 50); width: 100px; height: 100px}
.square { border: 1px solid black; width: 200px; height: 200px}
.ref { background-color: oklch(1 0.5 50); height: 100px}
/* l = 1.5 should clamp back to 1 */
.test { background-color: oklch(1.5 0.5 50); width: 100px; height: 100px}
.test { background-color: oklch(1.5 0.5 50); height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="square">
<div class="ref"></div>
<div class="test"></div>
</div>
</body>
13 changes: 8 additions & 5 deletions css/css-color/oklch-l-over-1-2.html
Expand Up @@ -5,13 +5,16 @@
<link rel="match" href="oklch-l-over-1-ref.html">
<meta name="assert" content="oklch() with lightness greater than 100%">
<style>
.ref { background-color: oklch(100% 0.5 50); width: 100px; height: 100px}
.square { border: 1px solid black; width: 200px; height: 200px}
.ref { background-color: oklch(100% 0.5 50); height: 100px}
/* l = 150% should clamp back to 100% */
.test { background-color: oklch(150% 0.5 50); width: 100px; height: 100px}
.test { background-color: oklch(150% 0.5 50); height: 100px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<div class="ref"></div>
<div class="test"></div>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="square">
<div class="ref"></div>
<div class="test"></div>
</div>
</body>
4 changes: 2 additions & 2 deletions css/css-color/oklch-l-over-1-ref.html
Expand Up @@ -2,10 +2,10 @@
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Oklch is always clamped to a value between 0 to 1</title>
<style>
.ref { background-color: oklch(1 0.5 50); width: 100px; height: 200px}
.ref { background-color: oklch(1 0.5 50); border: 1px solid black; width: 200px; height: 200px}
</style>

<body>
<p>Test passes if you see a single color.</p>
<p>Test passes if you see a square border with a single color inside.</p>
<div class="ref"></div>
</body>

0 comments on commit 2951eb2

Please sign in to comment.