Skip to content

Commit 13b033b

Browse files
committed
[css-backgrounds-3][css-backgrounds-4][css-borders-4][editorial] Fixed Bikeshed issues
1 parent 441a57d commit 13b033b

File tree

3 files changed

+233
-170
lines changed

3 files changed

+233
-170
lines changed

css-backgrounds-3/Overview.bs

Lines changed: 89 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,33 @@ WPT Path Prefix: css/css-backgrounds/
2020
WPT Display: closed
2121
At risk: animatability of 'box-shadow'
2222
At risk: applicability of 'border' and its longhands to [=ruby base containers=] and [=ruby annotation containers=]
23-
Ignored Vars: width of background positioning area, width of background image, height of background positioning area, height of background image, X, X', Li, Ltop, Lbottom, Lleft, Lright, Wside, Wleft, Wright, Wtop, Wbottom, spread distance
23+
Ignored Vars: width of background positioning area, width of background image, height of background positioning area, height of background image, X, X', Li, Ltop, Lbottom, Lleft, Lright, spread, Wside, Wleft, Wright, Wtop, Wbottom, spread distance
2424
</pre>
2525
<pre class="link-defaults">
26-
spec:css2; type:type; text:<uri>
27-
spec:css2; type:property; text:display
28-
spec:css2; type:value; text:table
29-
spec:css2; type:value; text:inline-table
30-
spec:css2; type:value; text:table-cell
31-
spec:css2; type:property; text:overflow
32-
spec:css2; type:value; for:overflow; text:visible
33-
spec:css2; type:dfn; text:viewport
3426
spec:css-break-4; type:dfn; text:fragment
35-
spec:css-color-4; type:property; text:color
36-
spec:css-color-4; type:value; text:transparent
37-
spec:selectors-3; type:selector; text: ::first-letter
38-
spec:selectors-3; type:selector; text: ::first-line
27+
spec:css-color-4;
28+
type:property; text:color
29+
type:value; text:transparent
30+
spec:css-sizing-3; type:dfn;
31+
text:size
32+
text:width
33+
text:height
3934
spec:css-values-3; type:type; text:<position>
35+
spec:css2;
36+
type:dfn; text:viewport
37+
type:property;
38+
text:display
39+
text:overflow
40+
type:type; text:<uri>
41+
type:value;
42+
text:table
43+
text:inline-table
44+
text:table-cell
45+
for:overflow; text:visible
46+
spec:selectors-3; type:selector;
47+
text: ::first-letter
48+
text: ::first-line
4049
spec:html; type:element; text:body
41-
spec:css-sizing-3; type:dfn; text:size
42-
spec:css-sizing-3; type:dfn; text:width
43-
spec:css-sizing-3; type:dfn; text:height
4450
</pre>
4551

4652
<h2 id="introduction">Introduction</h2>
@@ -59,7 +65,7 @@ spec:css-sizing-3; type:dfn; text:height
5965
but margins have no influence on the background and border.)
6066

6167
<figure>
62-
<img src="images/box.png"
68+
<img src="images/box.png" width="458" height="278"
6369
alt="Diagram of a typical box, showing the content, padding, border and margin areas"
6470
>
6571

@@ -530,7 +536,7 @@ Tiling Images: the 'background-repeat' property</h3>
530536
</pre>
531537

532538
<figure>
533-
<img src="images/bg-repeat.png"
539+
<img src="images/bg-repeat.png" width="243" height="334"
534540
alt="A centered background image, with copies repeated up and down the border, padding, and content areas."
535541
>
536542

@@ -552,7 +558,7 @@ Tiling Images: the 'background-repeat' property</h3>
552558
</pre>
553559

554560
<figure>
555-
<img src="images/bg-space.png"
561+
<img src="images/bg-space.png" width="250" height="365"
556562
alt="Image of an element with a dotted background"
557563
>
558564

@@ -830,8 +836,9 @@ Affixing Images: the 'background-attachment' property</h3>
830836
With a value pair of ''75% 50%'',
831837
the point 75% across and 50% down the image
832838
is to be placed at the point 75% across and 50% down the area.
839+
833840
<figure>
834-
<img src="images/bg-pos.png"
841+
<img src="images/bg-pos.png" width="397" height="269"
835842
alt="Diagram of image position within element"
836843
>
837844
<figcaption>
@@ -2046,8 +2053,8 @@ Line Colors: the 'border-color' properties</h3>
20462053
but behind the element's content (in case it overlaps).
20472054

20482055
<figure>
2049-
<img src="images/borderstyles.png"
2050-
alt="Examples of border styles"
2056+
<img src="images/borderstyles.png" width="669" height="383"
2057+
alt=""
20512058
>
20522059

20532060
<figcaption>Example renderings of the predefined border styles.</figcaption>
@@ -2367,7 +2374,7 @@ Curve Radii: the 'border-radius' properties</h3>
23672374
Negative values are invalid.
23682375

23692376
<figure>
2370-
<img src="images/corner.png"
2377+
<img src="images/corner.png" width="289" height="179"
23712378
alt="Diagram of the inscribed ellipse"
23722379
>
23732380

@@ -2446,8 +2453,8 @@ Corner Shaping</h3>
24462453
follow the curve of the border.
24472454

24482455
<figure>
2449-
<img src="images/smooth-radius.png"
2450-
alt="The effect of rounded corners on unequal borders"
2456+
<img src="images/smooth-radius.png" width="407" height="176"
2457+
alt=""
24512458
>
24522459

24532460
<figcaption>
@@ -2474,7 +2481,7 @@ Corner Shaping</h3>
24742481
border-top-right-radius: 100%; }
24752482
</pre>
24762483
<td>
2477-
<img src="images/partial-curve.png"
2484+
<img src="images/partial-curve.png" width="141" height="142"
24782485
alt="The curved corner is an arc from the top left corner
24792486
sweeping across the top right corner to the bottom right corner,
24802487
describing a quarter-ellipse;
@@ -2506,7 +2513,7 @@ Corner Shaping</h3>
25062513

25072514
This is done by computing the corresponding [=outset-adjusted border radius=].
25082515

2509-
To compute the <dfn export>outset-adjusted border radius</dfn> given the 2-dimensional [=size=]s |edge|, |radius|, and |outset|:
2516+
To compute the <dfn export>outset-adjusted border radius</dfn> given the 2-dimensional [=size=]'s |edge|, |radius|, and |outset|:
25102517
1. Let |coverage| be <code>2 * min(|radius|'s [=width=] / |edge|'s [=width=], |radius|'s [=height=] / |edge|'s [=height=])</code>.
25112518
1. Let |adustedRadiusWidth| be the [=adjusted radius dimension=] given |coverage|, |radius|'s [=width=], and |outset|'s [=width=].
25122519
1. Let |adustedRadiusHeight| be the [=adjusted radius dimension=] given |coverage|, |radius|'s [=height=], and |outset|'s [=height=].
@@ -2518,8 +2525,8 @@ Corner Shaping</h3>
25182525
1. Return <code>|radius| + |outset| * (1 - (1 - |ratio|)<sup>3</sup> * (1 - |coverage|<sup>3</sup>))</code>.
25192526

25202527
Note: this algorithm is designed to reduce the effect of the |outset| (or spread) on the shape of the corner.
2521-
The |coverage| factor makes this reduction more pronounced for rectangular shapes (where the [=border-radius=] is close to 0),
2522-
and less pronounced for elliptical shapes (where the [=border-radius=] is close to 50%).
2528+
The |coverage| factor makes this reduction more pronounced for rectangular shapes (where the [=border radius=] is close to 0),
2529+
and less pronounced for elliptical shapes (where the [=border radius=] is close to 50%).
25232530
</div>
25242531

25252532

@@ -2580,8 +2587,8 @@ Color and Style Transitions</h3>
25802587
or what function maps from this ratio to a point on the curve.
25812588

25822589
<figure>
2583-
<img src="images/transition-region.png"
2584-
alt="Illustration of the transition region on curved corners"
2590+
<img src="images/transition-region.png" width="600" height="178"
2591+
alt=""
25852592
>
25862593

25872594
<figcaption>
@@ -2657,8 +2664,8 @@ Overlapping Curves</h3>
26572664
See borders B in the figure.
26582665

26592666
<figure id=reduced-radius>
2660-
<img src="images/corner-large-mix.png"
2661-
alt="[image: rectangle with two tiny rounded corners and two very large ones, on opposite corners]"
2667+
<img src="images/corner-large-mix.png" width="539" height="168"
2668+
alt="rectangle with two tiny rounded corners and two very large ones, on opposite corners"
26622669
>
26632670

26642671
<figcaption>
@@ -2704,7 +2711,9 @@ Border Images</h2>
27042711
The image to tile is as follows.
27052712
Apart from the diamonds, it is transparent:
27062713

2707-
<img src="images/border.png" alt="Tile for border">
2714+
<img src="images/border.png" width="81" height="81"
2715+
alt="Tile for border"
2716+
>
27082717

27092718
The image is 81 by 81 pixels and has to be divided into 9 equal parts.
27102719
The style rules could thus be as follows:
@@ -2719,51 +2728,53 @@ Border Images</h2>
27192728
The result, when applied to a DIV of 12 by 5em,
27202729
will be similar to this:
27212730

2722-
<img src="images/borderresult.png" alt="element with a diamond border">
2731+
<img src="images/borderresult.png" width="239" height="116"
2732+
alt="Element with a diamond border"
2733+
>
27232734
</div>
27242735

2725-
<div class="example">
2726-
This shows a more complicated example,
2727-
demonstrating how the border image corresponds to the fallback border-style
2728-
but can also extend beyond the border area.
2729-
The border image is a wavy green border with an extended corner effect:
2736+
<div class="example">
2737+
This shows a more complicated example,
2738+
demonstrating how the border image corresponds to the fallback border-style
2739+
but can also extend beyond the border area.
2740+
The border image is a wavy green border with an extended corner effect:
27302741

2731-
<figure>
2732-
<img src="images/groovy-border-image-slice.png"
2733-
alt="Diagram: The border image shows a wavy green border
2734-
with more exaggerated waves towards the corners,
2735-
which are capped by a disconnected green circle.
2736-
Four cuts at 124px offsets from each side
2737-
divide the image into 124px-wide square corners,
2738-
124px-wide but thin side slices,
2739-
and a small center square."
2740-
>
2742+
<figure>
2743+
<img src="images/groovy-border-image-slice.png" width="396" height="375"
2744+
alt="Diagram: The border image shows a wavy green border
2745+
with more exaggerated waves towards the corners,
2746+
which are capped by a disconnected green circle.
2747+
Four cuts at 124px offsets from each side
2748+
divide the image into 124px-wide square corners,
2749+
124px-wide but thin side slices,
2750+
and a small center square."
2751+
>
27412752

2742-
<figcaption>
2743-
The 'border-image-source' image,
2744-
with the four 'border-image-slice' cuts at 124px
2745-
dividing the image into nine parts.
2746-
</figcaption>
2747-
</figure>
2753+
<figcaption>
2754+
The 'border-image-source' image,
2755+
with the four 'border-image-slice' cuts at 124px
2756+
dividing the image into nine parts.
2757+
</figcaption>
2758+
</figure>
27482759

2749-
The rest of the border properties then interact
2750-
to lay out the tiles as follows:
2760+
The rest of the border properties then interact
2761+
to lay out the tiles as follows:
27512762

2752-
<figure>
2753-
<img src="images/border-image.png"
2754-
alt="Diagram: The image-less (fallback) rendering
2755-
has a green double border.
2756-
The rendering with border-image shows the wavy green border,
2757-
ith the waves getting longer as they reach the corners.
2758-
The corner tiles render as 124px-wide squares
2759-
and the side tiles repeat a whole number of times
2760-
to fill the space in between.
2761-
Because of the gradual corner effects,
2762-
the tiles extend deep into the padding area.
2763-
The whole border image effect is outset 31px,
2764-
so that the troughs of the waves align
2765-
just outside the padding edge."
2766-
>
2763+
<figure>
2764+
<img src="images/border-image.png" width="452" height="537"
2765+
alt="Diagram: The image-less (fallback) rendering
2766+
has a green double border.
2767+
The rendering with border-image shows the wavy green border,
2768+
ith the waves getting longer as they reach the corners.
2769+
The corner tiles render as 124px-wide squares
2770+
and the side tiles repeat a whole number of times
2771+
to fill the space in between.
2772+
Because of the gradual corner effects,
2773+
the tiles extend deep into the padding area.
2774+
The whole border image effect is outset 31px,
2775+
so that the troughs of the waves align
2776+
just outside the padding edge."
2777+
>
27672778

27682779
<figcaption>
27692780
Diagram of all border-image properties and how they interact,
@@ -2932,8 +2943,9 @@ Image Slicing: the 'border-image-slice' property</h3>
29322943
with no [=specified size=] and the [=border image area=] as the [=default object size=].
29332944

29342945
<figure>
2935-
<img src="images/slice.png"
2936-
alt="Diagram: two horizontal cuts and two vertical cuts through an image">
2946+
<img src="images/slice.png" width="388" height="304"
2947+
alt="Diagram: two horizontal cuts and two vertical cuts through an image"
2948+
>
29372949

29382950
<figcaption>
29392951
Diagram illustrating the cuts corresponding to the value ''25% 30% 12% 20%''
@@ -3467,7 +3479,7 @@ Border Image Shorthand: the 'border-image' property</h3>
34673479
12px 12px 0px 8px rgba(0,0,0,0.4) inset</b>;
34683480
</pre>
34693481
<figure>
3470-
<img src="images/spread-blur.png"
3482+
<img src="images/spread-blur.png" width="251" height="244"
34713483
alt="The sample code above would create a 100px&times;100px orange box with a 12px blue border,
34723484
whose top right / bottom left corners are sharp and tob left / bottom right corners are elliptically curved.
34733485
Two shadows are created: an inner one, which due to its offset and spread creates a 20px-wide band of darker orange along the top and left sides of the box (curving to match the rounded top left border shape);
@@ -3610,7 +3622,7 @@ Shadow Shape, Spread, and Knockout</h4>
36103622
the corner radii of the shadow are also increased (decreased, for inner shadows)
36113623
from the border-box (padding-box) radii by adding (subtracting)
36123624
the [=spread distance=] (and flooring at zero).
3613-
For outer shadows, the [=border-radius=] is then [=outset-adjusted border radius|adjusted=], independently in each dimension,
3625+
For outer shadows, the [=border radius=] is then [=outset-adjusted border radius|adjusted=], independently in each dimension,
36143626
to preserve the sharpness of rounded corners.
36153627

36163628
The 'border-image' does not affect the shape of the box-shadow.

css-backgrounds-4/Overview.bs

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Introduction</h2>
4949
but margins have no influence on the background and border.)
5050

5151
<figure>
52-
<img src="images/box.png"
52+
<img src="images/box.png" width="458" height="278"
5353
alt="Diagram of a typical box, showing the content, padding, border and margin areas"
5454
>
5555

@@ -390,15 +390,18 @@ Tiling Images: the 'background-repeat-x', 'background-repeat-y', 'background-rep
390390
}
391391
</pre>
392392

393-
<div class="figure">
394-
<p><img src="images/bg-repeat.png" alt="A centered background image, with
395-
copies repeated up and down the border, padding and content
396-
areas.">
397-
398-
<p class="caption">The effect of ''repeat'': One copy
399-
of the background image is centered, and other copies are put above
400-
and below it to make a vertical band behind the element.
401-
</div>
393+
<figure>
394+
<img src="images/bg-repeat.png" width="243" height="334"
395+
alt="A centered background image, with copies repeated up and down the border, padding, and content areas."
396+
>
397+
398+
<figcaption>
399+
The effect of ''repeat-y'':
400+
One copy of the background image is centered,
401+
and other copies are put above and below it
402+
to make a vertical band behind the element.
403+
</figcaption>
404+
</figure>
402405
</div>
403406

404407
<p>See the section [[#layering]] for how
@@ -517,13 +520,17 @@ Tiling Images Shorthand: the 'background-repeat' property</h3>
517520
}
518521
</pre>
519522

520-
<div class=figure>
521-
<p><img src="images/bg-space.png" alt="Image of an element with a dotted background">
522-
523-
<p class=caption>The effect of ''background-repeat/space'': the image of a dot is
524-
tiled to cover the whole background and the images are equally
525-
spaced.
526-
</div>
523+
<figure>
524+
<img src="images/bg-space.png" width="250" height="365"
525+
alt="Image of an element with a dotted background"
526+
>
527+
528+
<figcaption>
529+
The effect of ''background-repeat/space'':
530+
the image of a dot is tiled to cover the whole background
531+
and the images are equally spaced.
532+
</figcaption>
533+
</figure>
527534
</div>
528535

529536
<p>See the section [[#layering]] for how 'background-repeat' interacts with other
@@ -756,7 +763,7 @@ Background Positioning: the 'background-position-x', 'background-position-y', 'b
756763
is to be placed at the point 75% across and 50% down the area.
757764

758765
<figure>
759-
<img src="images/bg-pos.png"
766+
<img src="images/bg-pos.png" width="397" height="269"
760767
alt="Diagram of image position within element"
761768
>
762769
<figcaption>
@@ -1003,6 +1010,7 @@ Painting Area: the 'background-clip' property</h3>
10031010
background-clip/clip-text-on-body-not-propagated-to-root.html
10041011
background-clip/clip-text-on-body-propagated-to-root.html
10051012
background-clip/clip-text-on-root.html
1013+
background-clip/clip-text-out-of-flow-child.html
10061014
background-clip/clip-text-text-decorations.html
10071015
background-clip/clip-text-text-emphasis.html
10081016
background-clip_padding-box.html

0 commit comments

Comments
 (0)