Skip to content

Commit 72f2bb2

Browse files
committed
[css-grid] Verify that the reference to replaced elements really means that, and shouldn't apply to anything with an 'aspect-ratio'. Also slightly rearrange/rewrite for clarity.
1 parent 9f03cf3 commit 72f2bb2

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

css-grid-1/Overview.bs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,18 +1107,27 @@ Grid Items</h2>
11071107
vary by their [[css-align-3#self-alignment|self-alignment values]]:
11081108

11091109
: ''align-self/normal''
1110-
:: If the grid item is either non-replaced--
1111-
or is replaced but has no intrinsic aspect ratio and no intrinsic size in the relevant dimension--
1112-
use the width calculation rules for non-replaced boxes
1113-
as defined in <a href="https://www.w3.org/TR/CSS2/visudet.html#blockwidth">CSS2.1 § 10.3.3</a>.
1114-
1115-
Otherwise, if the grid item has an intrinsic ratio or an intrinsic size in the relevant dimension,
1110+
::
1111+
If the grid item is a [=replaced element=] with an intrinsic size in the relevant dimension
1112+
(or with an aspect ratio and an intrinsic size in the other dimension)
11161113
the grid item is sized as for ''align-self: start''
1117-
(consistent with the width calculation rules for block-level replaced elements in <a href="https://www.w3.org/TR/CSS2/visudet.html#block-replaced-width">CSS2.1 § 10.3.4</a>).
1114+
(consistent with the width calculation rules for block-level replaced elements in [[CSS2/visudet#block-replaced-width]]).
1115+
1116+
Otherwise,
1117+
use the [=inline size=] calculation rules for non-replaced boxes
1118+
(defined in [[CSS2/visudet#blockwidth]],
1119+
and modified by the rules for handling the 'aspect-ratio' property
1120+
when resolving ''width/auto'' sizes in [[CSS-SIZING-4]]).
1121+
11181122
: ''align-self/stretch''
1119-
:: Use the width calculation rules for non-replaced boxes, as defined in <a href="https://www.w3.org/TR/CSS2/visudet.html#blockwidth">CSS2.1 § 10.3.3</a>.
1123+
::
1124+
Use the [=inline size=] calculation rules for non-replaced boxes
1125+
(defined in [[CSS2/visudet#blockwidth]],
1126+
and modified by the rules for handling the 'aspect-ratio' property
1127+
when resolving ''width/auto'' sizes in [[CSS-SIZING-4]]).
11201128

11211129
Note: This may distort the aspect ratio of the item, if it has one.
1130+
11221131
: all other values
11231132
:: Size the item as ''width/fit-content''.
11241133

0 commit comments

Comments
 (0)