Skip to content

Commit

Permalink
[tests] Test for none
Browse files Browse the repository at this point in the history
  • Loading branch information
svgeesus committed Sep 2, 2023
1 parent e28cd6a commit d6e70db
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion tests/parse.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ <h1>Lab and LCH colors</h1>
<td>Lab(100% 0 0)</td>
<td>{"spaceId":"lab","coords":[100,0,0],"alpha":1}</td>
</tr>
<tr title="no percent">
<td>lab(80 0 0)</td>
<td>{"spaceId":"lab","coords":[80,0,0],"alpha":1}</td>
</tr>
<tr>
<td>lab(100 -50 50)</td>
<td>{"spaceId":"lab","coords":[100,-50,50],"alpha":1}</td>
Expand All @@ -93,7 +97,7 @@ <h1>Lab and LCH colors</h1>
<td>lch(100% 0 0)</td>
<td>{"spaceId":"lch","coords":[100,0,0],"alpha":1}</td>
</tr>
<tr>
<tr title="no percentage">
<td>lch(100 50 50)</td>
<td>{"spaceId":"lch","coords":[100,50,50],"alpha":1}</td>
</tr>
Expand All @@ -105,6 +109,10 @@ <h1>Lab and LCH colors</h1>
<td>lch(100 50 450)</td>
<td>{"spaceId":"lch","coords":[100,50,450],"alpha":1}</td>
</tr>
<tr title="none hue">
<td>lch(100 0 none)</td>
<td>{"spaceId":"lch","coords":[100,00,NaN],"alpha":1}</td>
</tr>
</table>
</section>

Expand Down Expand Up @@ -172,6 +180,14 @@ <h1>Oklch colors</h1>
<td>oklch(100% 0 30deg)</td>
<td>{"spaceId":"oklch","coords":[1,0,30],"alpha":1}</td>
</tr>
<tr title="none hue">
<td>oklch(1 0 none)</td>
<td>{"spaceId":"oklch","coords":[1,0,NaN],"alpha":1}</td>
</tr>
<tr title="none alpha">
<td>oklch(1 0 120 / none)</td>
<td>{"spaceId":"oklch","coords":[1,0,120],"alpha":NaN}</td>
</tr>
</table>
</section>

Expand Down Expand Up @@ -290,6 +306,10 @@ <h1>color()</h1>
<td>color(display-p3 1 / .5)</td>
<td>{"spaceId":"p3","coords":[1,0,0],"alpha":0.5}</td>
</tr>
<tr title="none red">
<td>color(display-p3 none 1 .5)</td>
<td>{"spaceId":"p3","coords":[NaN,1,0.5],"alpha":1}</td>
</tr>

</table>
</section>
Expand Down Expand Up @@ -326,6 +346,18 @@ <h1>hsl()</h1>
<td>hsl(0.25turn 0% 0% / .5)</td>
<td>{"spaceId":"hsl","coords":[90,0,0],"alpha":0.5}</td>
</tr>
<tr title="hsla(), none hue, spaces and slash">
<td>hsl(none 0% 0% / .5)</td>
<td>{"spaceId":"hsl","coords":[NaN,0,0],"alpha":0.5}</td>
</tr>
<tr title="hsla(), oog color(rec2020 0 0 1)">
<td>hsl(90deg 0% 0% / .5)</td>
<td>{"spaceId":"hsl","coords":[90,0,0],"alpha":0.5}</td>
</tr>
<tr title="hsl(), none hue ">
<td>hsl(none, 50%, 50%)</td>
<td>{"spaceId":"hsl","coords":[NaN,50,50],"alpha":1}</td>
</tr>
</table>
</section>

Expand All @@ -337,6 +369,10 @@ <h1>hwb()</h1>
<td>hwb(180 20% 30%)</td>
<td>{"spaceId":"hwb","coords":[180,20,30],"alpha":1}</td>
</tr>
<tr title="none hue">
<td>hwb(none 20% 30%)</td>
<td>{"spaceId":"hwb","coords":[NaN,20,30],"alpha":1}</td>
</tr>
</table>
</section>

Expand Down

0 comments on commit d6e70db

Please sign in to comment.