Skip to content

Commit 4cdb98e

Browse files
committed
[css-sizing] Floor stretch-fit size at zero.
1 parent 4ddef9c commit 4cdb98e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

css-sizing/Overview.bs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ Terminology</h2>
125125
The <a>stretch fit</a> into a given size
126126
is that size,
127127
minus the element's computed margins (not collapsed, treating ''margin/auto'' as zero),
128-
border, and padding in the given dimension.
128+
border, and padding in the given dimension
129+
(such that the outer size is a perfect fit),
130+
and flooring at zero
131+
(so that the inner size is not negative).
129132

130133
<p class='note'>
131134
Note: This is the formula used to calculate the ''width/auto'' widths
@@ -578,7 +581,8 @@ Stretch-fit Sizing</h3>
578581
<p>
579582
&hellip;less the box's <a>inline-axis</a> margins
580583
(after any <a href="https://www.w3.org/TR/CSS21/box.html#collapsing-margins">margin collapsing</a>, and treating ''margin/auto'' margins as zero),
581-
borders, and padding.
584+
borders, and padding,
585+
flooring at zero.
582586

583587
Issue: Shouldn't this be ignoring margin collapsing?
584588

0 commit comments

Comments
 (0)