Skip to content

Commit fdbc7c6

Browse files
committed
[css-backgrounds-4] Fix the border-color and border-clip grammars, and generally reformat. Fixes w3c#2916.
1 parent 0752016 commit fdbc7c6

1 file changed

Lines changed: 38 additions & 73 deletions

File tree

css-backgrounds-4/Overview.bs

Lines changed: 38 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Painting Area: the 'background-clip' property</h3>
132132

133133
<pre class="propdef partial">
134134
Name: background-clip
135-
New Values: text, border
135+
New Values: text | border
136136
</pre>
137137

138138
Issue: Or should this be defining the <css>-webkit-background-clip</css> property,
@@ -155,98 +155,63 @@ Painting Area: the 'background-clip' property</h3>
155155
<h2 id="borders">
156156
Borders</h2>
157157

158-
<h3 id="the-border-color">Line Colors: the 'border-color' properties</h3>
159-
160-
<table class="propdef">
161-
<tr>
162-
<th>Name:
163-
<td><dfn>border-top-color</dfn> ,
164-
<dfn>border-right-color</dfn>,
165-
<dfn>border-bottom-color</dfn>,
166-
<dfn>border-left-color</dfn>
167-
<tr>
168-
<th><a href="#values">Value</a>:
169-
<td><<color>>#
170-
<tr>
171-
<th>Initial:
172-
<td><a href="https://www.w3.org/TR/css3-color/#currentcolor">currentColor</a>
173-
<tr>
174-
<th>Applies to:
175-
<td>all elements
176-
<tr>
177-
<th>Inherited:
178-
<td>no
179-
<tr>
180-
<th>Percentages:
181-
<td>N/A
182-
<tr>
183-
<th>Computed value:
184-
<td>the computed color
185-
<tr>
186-
<th>Animatable:
187-
<td>See prose
188-
</table>
189-
190-
<table class="propdef">
191-
<tr>
192-
<th>Name:
193-
<td><dfn id="border-color">border-color</dfn>
194-
<tr>
195-
<th><a href="#values">Value</a>:
196-
<td>(<<color>>{1,4})#
197-
<tr>
198-
<th>Initial:
199-
<td>(see individual properties)
200-
<tr>
201-
<th>Applies to:
202-
<td>all elements
203-
<tr>
204-
<th>Inherited:
205-
<td>no
206-
<tr>
207-
<th>Percentages:
208-
<td>N/A
209-
<tr>
210-
<th>Computed value:
211-
<td>see individual properties
212-
<tr>
213-
<th>Animatable:
214-
<td>see individual properties
215-
</table>
216-
217-
<p>These properties set the foreground color of the border specified
218-
by the <span class=property>border-style</span> properties.
158+
<h3 id="the-border-color">Line Colors: the 'border-color' properties</h3>
159+
160+
<pre class=propdef>
161+
Name: border-top-color, border-right-color, border-bottom-color, border-left-color
162+
Value: <<color>>#
163+
Initial: currentcolor
164+
Applies to: all elements
165+
Inherited: no
166+
Percentages: n/a
167+
Computed Value: the computed color
168+
Animation Type: see prose
169+
</pre>
170+
171+
<pre class="propdef shorthand">
172+
Name: border-color
173+
Value: <<color>>{1,4}#
174+
</pre>
175+
176+
These properties set the foreground color of the border specified
177+
by the 'border-style' properties.
219178
If a list of values is provided, the border is split into equal width bands of each color
220-
along the direction of the side the border is applied on (i.e. split horizontally on left and right borders and vertically on top and bottom borders),
179+
along the direction of the side the border is applied on
180+
(i.e. split horizontally on left and right borders and vertically on top and bottom borders),
221181
starting outwards.
222182

223-
<p>When interpolating between borders with the same number of colors, interpolation is performed individually per color band as <a href="https://www.w3.org/TR/css3-transitions/#animtype-color">color</a>.
224-
Interpolation between borders with different numbers of colors is discrete.
183+
When interpolating between borders with the same number of colors,
184+
interpolation is performed individually per color band as <a href="https://www.w3.org/TR/css3-transitions/#animtype-color">color</a>.
185+
Interpolation between borders with different numbers of colors is discrete.
225186

226-
<p>'Border-color' is a shorthand for the
227-
four 'border-*-color' properties. The four values set the top, right,
228-
bottom and left border, respectively. A missing left is the same as
229-
right, a missing bottom is the same as top, and a missing right is
230-
also the same as top. This is resolved individually for each list item.
187+
'border-color' is a shorthand for the four 'border-*-color' properties.
188+
The four values set the top, right, bottom and left border, respectively.
189+
A missing left is the same as right,
190+
a missing bottom is the same as top,
191+
and a missing right is also the same as top.
192+
This is resolved individually for each list item.
231193

232194
<div class="example">
233195
Using multiple colors for each side:
234196

235-
<pre>
197+
<pre class=lang-css>
198+
.foo {
236199
border: 30px solid;
237200
border-color: skyblue orange yellowgreen indianred, black yellow;
201+
}
238202
</pre>
239203

240204
Sample rendering:
241205

242206
<img src="images/multicolor-border.png" alt="">
243207

244-
The same border colors with 'border-style: dotted':
208+
The same border colors with ''border-style: dotted'':
245209

246210
<img src="images/multicolor-border-dotted.png" alt="">
247211
</div>
248212

249-
Issue: The syntax for comma-separated multiple colors <a href="https://github.com/w3c/csswg-drafts/issues/1172#issuecomment-379878579">is still under active discussion</a> in the CSS WG.
213+
Issue: The syntax for comma-separated multiple colors
214+
<a href="https://github.com/w3c/csswg-drafts/issues/1172#issuecomment-379878579">is still under active discussion</a> in the CSS WG.
250215

251216
<h2 id="corners">
252217
Corners</h2>

0 commit comments

Comments
 (0)