Skip to content

Commit

Permalink
[css-align-3] Make text clearer for sizing of abspos double-auto bloc…
Browse files Browse the repository at this point in the history
…ks. #1432
  • Loading branch information
tabatkins committed Jan 9, 2020
1 parent ba35682 commit 824198d
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions css-align-3/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ Effects on Sizing of Absolutely Positioned Boxes with Static-Position Insets</h3
the <a>available space</a> for calculating the <a>inline size</a>
is also affected by alignment.

In [[CSS2]], this is keyed off of the the 'direction' property
Note: In [[CSS2]], the [=available space=] is keyed off of the the 'direction' property
of the <a>static-position containing block</a>.
(See <a href="https://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width">CSS2&sect;10.3.7</a>
and <a href="https://www.w3.org/TR/CSS2/visudet.html#abs-replaced-width">CSS2&sect;10.3.8</a>.)
Expand All @@ -1715,18 +1715,21 @@ Effects on Sizing of Absolutely Positioned Boxes with Static-Position Insets</h3
to the corresponding edge of the <a>static position rectangle</a>
and the other to the corresponding edge of the <a>containing block</a>
(i.e. set the inset to zero).

Just as the <a>self-alignment properties</a>
replace the <a>containing block</a>’s 'direction' for placement,
they also replace this lookup for sizing.
replace the <a>containing block</a>’s 'direction' lookup for placement,
they also replace this lookup for sizing,
as specified here.

Thus,
when interpreting the rules in
<a href="https://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width">CSS2&sect;10.3.7</a>
and <a href="https://www.w3.org/TR/CSS2/visudet.html#abs-replaced-width">CSS2&sect;10.3.8</a>,
wherever the 'direction' property of the <a>static-position containing block</a> is referenced,
instead reference the value of the 'align-self' or 'justify-self' property
(whichever is defined to apply to the relevant axis),
treating ''justify-self/normal'' as ''start''
treating left-equivalent alignment as defined for ''ltr''
and right-equivalent alignment as defined for ''rtl''.
Treat ''justify-self/normal'' as ''start''
and any <a>distributed alignment</a> value as its <a>fallback alignment</a>.

In the case of ''justify-self/center'' alignment,
Expand All @@ -1747,7 +1750,8 @@ Effects on Sizing of Absolutely Positioned Boxes with Static-Position Insets</h3
Instead of always sizing
within the available space between
the <a>inline-start</a> <a>static position</a>
and the <a>inline-end</a> <a>containing block</a> edge,
and the <a>inline-end</a> <a>containing block</a> edge
as specified in [[CSS2]],
an absolutely-positioned element with ''left/auto'' insets
will be sized with reference to
the <a>static position rectangle</a>’s edge(s)
Expand Down Expand Up @@ -1777,6 +1781,10 @@ Effects on Sizing of Absolutely Positioned Boxes with Static-Position Insets</h3
with <a>stretch-fit sizing</a> (consuming all of the <a>available space</a>).
This is an independent effect from the available space adjustment here.

Note: This only affect how [=available space=] is calculated
for sizing the absolutely-positioned box;
its alignment is as specified in previous sections.

<!--
████ ████████ ████████ ██ ██ ██████
██ ██ ██ ██ ██ ███ ███ ██ ██
Expand Down

0 comments on commit 824198d

Please sign in to comment.