Skip to content

Commit

Permalink
Put stripes() definition behind a <1d-image> type to make it easily e…
Browse files Browse the repository at this point in the history
…xtensible
  • Loading branch information
SebastianZ committed Apr 20, 2022
1 parent dffc673 commit 8046368
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions css-backgrounds-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -185,24 +185,24 @@ Painting Area: the 'background-clip' property</h3>

<pre class=propdef>
Name: border-top-color, border-right-color, border-bottom-color, border-left-color
Value: <<color>> || <<stripes()>>
Value: <<color>> || <<1d-image>>
Initial: currentcolor
Applies to: all elements
Inherited: no
Percentages: n/a
Computed Value: the computed color and/or <<stripes()>> function
Computed Value: the computed color and/or a one-dimensional image function
Animation type: see prose
</pre>

<pre class="propdef shorthand">
Name: border-color
Value: [ <<color>> || <<stripes()>> ]{1,4}
Value: [ <<color>> || <<1d-image>> ]{1,4}
</pre>

These properties set the foreground color of the border specified
by the 'border-style' properties.

The stripes defined by the <<stripes()>> function follow the direction of
The stripes defined by <<1d-image>> follow the direction of
the side the border is applied on (i.e. horizontally on left and
right borders and vertically on top and bottom borders), starting outwards.
With that, the corresponding 'border-*-width' property defines the total
Expand Down Expand Up @@ -711,7 +711,7 @@ Additions Since Level 3</h3>
<li>logical 'background-position' values (''background-position/start'', ''background-position/end'')
<li>the ''extend'' keyword of 'background-repeat'
<li>'corner-shape'
<li><<stripes()>> as value for ''border-color'' and its longhands
<li><<1d-image>> as value for ''border-color'' and its longhands
<li>multiple border colors per border
<li>logical border properties
<li><a href="#partial-borders">Partial Borders</a> (make part of border shorthand as well!)
Expand Down
7 changes: 4 additions & 3 deletions css-images-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Value Definitions {#values}
or <a section href="#gradients">gradient notation</a>.
Its syntax is:

<pre class="prod"><dfn>&lt;image></dfn> = <<url>> | <<image()>> | <<image-set()>> | <<cross-fade()>> | <<element()>> | <<gradient>> | <<stripes()>></pre>
<pre class="prod"><dfn>&lt;image></dfn> = <<url>> | <<image()>> | <<image-set()>> | <<cross-fade()>> | <<element()>> | <<gradient>> | <<1d-image>></pre>

An <<image>> can be used in many CSS properties,
including the 'background-image', 'list-style-image', 'cursor' properties [[!CSS2]]
Expand Down Expand Up @@ -1910,9 +1910,10 @@ Color Stop “Fixup”</h4>
The ''stripes()'' function allows to define a number of stripes of
different colors with different widths.

The syntax for ''stripes()'' is defined as:
The syntax for ''1d-image'' and ''stripes()'' is defined as:

<pre class=prod>
<dfn>&lt;1d-image></dfn> = <<stripes()>>
<dfn>stripes()</dfn> = stripes( [ <<color>> && [ <<length-percentage>> | <<flex>>]? ]# )
</pre>

Expand Down Expand Up @@ -2544,7 +2545,7 @@ Changes {#changes}
- Switched color-stop grammar to repeat at end for readability
- Clarified that object-fit and image-resolution use discrete animation
- Fixed definition of cross-fade() image blending
- Added stripes() function and added it to &lt;image> data type
- Added &lt;1d-image> data type and stripes() function and added &1d-image> to &lt;image> data type
- Moved interpolation of images from [[css3-images]]
- Clarifed that cross-fade() takes 1+ arguments. Defined sizing and painting of the new function arguments in detail.
- Moved cross-fade() from [[css3-images]]
Expand Down
6 changes: 3 additions & 3 deletions css-ui-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,14 @@ Animation type: by computed value

<pre class="propdef">
Name: outline-color
Value: [ <<color>> || <<stripes()>> ] | invert
Value: [ <<color>> || <<1d-image>> ] | invert
Initial: invert
Applies to: all elements
Inherited: no
Percentages: N/A
Computed value: The computed value for ''outline-color/invert'' is ''outline-color/invert''.
For <<color>> values, see [[!CSS-COLOR-4#resolving-color-values]] in [[!CSS-COLOR-4]].
<<stripes()>> values are computed as defined in their definition.
<<1d-image>> values are computed as defined in their definition.
Animation type: by computed value
</pre>

Expand Down Expand Up @@ -2470,7 +2470,7 @@ the following normative changes have been made:
(Support for the broader <<image>> type remains allowed but optional.)

<li>
Added <<stripes()>> as value for the 'outline-color' property.
Added <<1d-image>> as value for the 'outline-color' property.
</ul>

<h3 id=changes-24-1-2020 class=no-num>Changes from the
Expand Down

0 comments on commit 8046368

Please sign in to comment.