Skip to content

Commit 4ee79e5

Browse files
committed
[css-align] Make 'stretch' not stretch replaced block-level/abspos boxes. Add issue about this.
1 parent 7eda583 commit 4ee79e5

2 files changed

Lines changed: 32 additions & 19 deletions

File tree

css-align/Overview.html

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,10 +1023,10 @@ <h3 id=justify-self-property><span class=secno>5.1. </span>
10231023
used value of the offset properties are not adjusted to correct for the
10241024
over-constraint.
10251025

1026-
<p class=note> The ‘<a href="#lsquostretchrsquo0"><code
1027-
class=css>stretch</code></a>keyword is equivalent to ‘<a
1028-
href="#lsquostartrsquo"><code class=css>start</code></a>, since block
1029-
layout already stretches by default.
1026+
<p> The ‘<a href="#lsquostretchrsquo0"><code
1027+
class=css>stretch</code></a>value is equivalent to ‘<a
1028+
href="#lsquostartrsquo"><code class=css>start</code></a> on
1029+
block-level boxes.
10301030

10311031
<dt>Absolutely-positioned Boxes:
10321032

@@ -1068,9 +1068,11 @@ <h3 id=justify-self-property><span class=secno>5.1. </span>
10681068
used value of the offset properties are not adjusted to correct for the
10691069
over-constraint.
10701070

1071-
<p class=issue> Make stretch work on replaced items? This requires
1072-
keeping ‘<a href="#lsquoautorsquo1"><code class=css>auto</code></a>
1073-
as ‘<a href="#lsquoautorsquo1"><code class=css>auto</code></a>’.
1071+
<p> The ‘<a href="#lsquostretchrsquo0"><code
1072+
class=css>stretch</code></a>’ keyword is equivalent to ‘<a
1073+
href="#lsquostartrsquo"><code class=css>start</code></a>’ on replaced
1074+
absolutely-positioned boxes. (This is because CSS 2.1 does not stretch
1075+
replaced elements to fit into fixed offsets.)
10741076

10751077
<dt>Grid Items:
10761078

@@ -1081,15 +1083,21 @@ <h3 id=justify-self-property><span class=secno>5.1. </span>
10811083

10821084
<p>The <a href="#alignment-container"><i>alignment container</i></a> is
10831085
the <i>grid cell</i>. The <a href="#alignment-subject"><i>alignment
1084-
subject</i></a> is <i>grid item</i><code class=css>s margin box. The
1085-
default <a href="#overflow-alignment"><i>overflow alignment</i></a> is
1086-
</code>’‘<a href="#lsquotruersquo"><code
1087-
class=property>true</code></a>’‘<code class=css>. </code>
1086+
subject</i></a> is <i>grid item</i>’s margin box. The default <a
1087+
href="#overflow-alignment"><i>overflow alignment</i></a> is ‘<a
1088+
href="#lsquotruersquo"><code class=css>true</code></a>’.
10881089
</dl>
10891090

1091+
<p class=issue> Should we make ‘<a href="#lsquostretchrsquo0"><code
1092+
class=css>stretch</code></a>’ actually work on block-level/abspos
1093+
replaced boxes? To maintain legacy compat, this requires adding a new
1094+
value (named ‘<code class=css>normal</code>’?) which has the current
1095+
behavior of stretching non-replaced boxes and start-aligning replaced
1096+
ones.
1097+
10901098
<div class=example>
10911099
<p>The effect of these rules is that an auto-sized block-level table, for
1092-
example, can be aligned while still having side margins. If the tables
1100+
example, can be aligned while still having side margins. If the table's
10931101
max-content size is narrower than its containing block, then it is
10941102
shrink-wrapped to that size and aligned as specified. If the table's
10951103
max-content size is wider, then it fills its containing block, and the

css-align/Overview.src.html

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,9 @@ <h3 id='justify-self-property'>
567567
are ignored in favor of alignment as specified here
568568
and the used value of the offset properties are not adjusted to correct for the over-constraint.
569569

570-
<p class="note">
571-
The ''stretch'' keyword is equivalent to ''start'',
572-
since block layout already stretches by default.
570+
<p>
571+
The ''stretch'' value is equivalent to ''start'' on block-level boxes.
572+
573573

574574
<dt>Absolutely-positioned Boxes:
575575
<dd>
@@ -593,19 +593,24 @@ <h3 id='justify-self-property'>
593593
are ignored in favor of alignment as specified here
594594
and the used value of the offset properties are not adjusted to correct for the over-constraint.
595595

596-
<p class="issue">
597-
Make stretch work on replaced items?
598-
This requires keeping ''auto'' as ''auto''.
596+
<p>
597+
The ''stretch'' keyword is equivalent to ''start'' on replaced absolutely-positioned boxes.
598+
(This is because CSS 2.1 does not stretch replaced elements to fit into fixed offsets.)
599599

600600
<dt>Grid Items:
601601
<dd>
602602
<p>The 'justify-self' property applies along the grid's <i>row axis</i>.
603603

604604
<p>The <i>alignment container</i> is the <i>grid cell</i>.
605-
The <i>alignment subject</i> is <i>grid item</i>'s margin box.
605+
The <i>alignment subject</i> is <i>grid item</i>s margin box.
606606
The default <i>overflow alignment</i> is ''true''.
607607
</dl>
608608

609+
<p class='issue'>
610+
Should we make ''stretch'' actually work on block-level/abspos replaced boxes?
611+
To maintain legacy compat, this requires adding a new value (named ''normal''?)
612+
which has the current behavior of stretching non-replaced boxes and start-aligning replaced ones.
613+
609614
<div class="example">
610615
<p>The effect of these rules is that an auto-sized block-level table,
611616
for example, can be aligned while still having side margins.

0 commit comments

Comments
 (0)