Skip to content

Commit 2888adb

Browse files
authored
chore: use markdown (#379)
* chore: use markdown * Improve grammar
1 parent 5e0cf7f commit 2888adb

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

technical-reports/color/color-type.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ While both examples will render as white, the first example is more explicit abo
100100
The following values are supported for the `colorSpace` property. The `components` array will vary depending on the color space.
101101

102102
<aside class="ednote" title="Syntax for expressing ranges">
103-
<p>In this table, brackets <code>[]</code> indicate that an extrema are included, parentheses <code>()</code> indicate that the <a href="https://en.wikipedia.org/wiki/Maximum_and_minimum">extrema</a> are excluded. For example, in the HSL color space, hue is in the range of <a href="https://www.w3.org/TR/css-color-4/#hue-syntax">[0 - 360)</a>, which means that <code>0</code> MAY be used but <code>360</code> MUST NOT be used.</p>
103+
104+
In this table, brackets `[]` indicate that [extrema](https://en.wikipedia.org/wiki/Maximum_and_minimum) are _included_, parentheses `()` indicate that the extrema are _excluded_. For example, in the HSL color space, hue is in the range of [[0 - 360)](https://www.w3.org/TR/css-color-4/#hue-syntax), which means that `0` MAY be used but `360` MUST NOT be used.
105+
104106
</aside>
105107

106108
<table class="data">
@@ -324,6 +326,7 @@ The following values are supported for the `colorSpace` property. The `component
324326
</tr>
325327
</tbody>
326328
</table>
329+
327330
<div>
328331
<span><span id="fn-1">*</span> In CIELAB, A and B are unbounded but in practice don't exceed -160 to 160</span><br />
329332
<span><span id="fn-2">**</span> In LCH, C is unbounded but in practice doesn't exceed 230</span><br />
@@ -332,21 +335,27 @@ The following values are supported for the `colorSpace` property. The `component
332335
</div>
333336

334337
<aside class="ednote" title="Precision in examples">
335-
<p>The examples below have varying degrees of precision (i.e. numbers after the decimal). This is done to ensure that the <code>fallback</code> color is exactly the same as the defined color when converted to HEX. In practice, the numbers used to define each component can have any degree of precision.</p>
338+
339+
The examples below have varying degrees of precision (i.e. numbers after the decimal). This is done to ensure that the `fallback` color is exactly the same as the defined color when converted to HEX. In practice, the numbers used to define each component can have any degree of precision.
340+
336341
</aside>
337342

338343
<aside class="ednote" title="Optional values in examples">
339-
<p>The examples below are given with all optional values (alpha, hex) included for the purpose of completeness. Defining the alpha property for fully-opaque colors is not required, see <a href="#format">#format</a>.</p>
344+
345+
The examples below are given with all optional values (alpha, hex) included for the purpose of completeness. Defining the alpha property for fully-opaque colors is not required, see [Format](#format).
346+
340347
</aside>
341348

342349
<aside class="ednote" title="How does this conform to CSS Color Module 4?">
343-
<p>To provide a logically consistent approach without creating ambiguity around the format, this spec takes the following approach:</p>
344-
<ul>
345-
<li>If CSS Color Module 4 allows a color space to be referenced by <strong>both</strong> a named function (like <code>srgb()</code>) <strong>and</strong> a keyword in the <code>color()</code> function, use the format intended for the <code>color()</code> function.</li>
346-
<li>If CSS Color Module 4 only defines a color space <strong>either</strong> as a named function (like <code>hwb()</code>) <strong>or</strong> a keyword in the <code>color()</code> function (like <code>rec-2020</code>), use the syntax indicated.</li>
347-
<li>If CSS Color Module 4 allows <strong>both</strong> unit values (like <code>50</code>) <strong>and</strong> percentages (like <code>50%</code>) for a component, use the unit value.</li>
348-
</ul>
349-
<p>Using this spec as a reference allows us to focus on the design and implementation of the tokens themselves, rather than the underlying color science.</p>
350+
351+
To provide a logically consistent approach without creating ambiguity around the format, this spec takes the following approach:
352+
353+
- If CSS Color Module 4 allows a color space to be referenced by **both** a named function (like `srgb()`) **and** a keyword in the `color()` function, use the format intended for the `color()` function.
354+
- If CSS Color Module 4 only defines a color space **either** as a named function (like `hwb()`) **or** a keyword in the `color()` function (like `rec-2020`), use the syntax indicated.
355+
- If CSS Color Module 4 allows **both** unit values (like `50`) **and** percentages (like `50%`) for a component, use the unit value.
356+
357+
Using this spec as a reference allows us to focus on the design and implementation of the tokens themselves, rather than the underlying color science.
358+
350359
</aside>
351360

352361
### sRGB

0 commit comments

Comments
 (0)