Skip to content

Commit d33f586

Browse files
committed
[css-sizing] Define intrinsic size contribution of percentage margins and paddings as zero per WG resolution. Fixes w3c#347.
1 parent 6e04073 commit d33f586

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

css-sizing-3/Overview.bs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,14 +521,20 @@ Stretch-fit Sizing</h3>
521521
* Otherwise, the percentage is resolved against the containing block’s size.
522522
(The containing block’s size is not re-resolved based on the resulting size of the box;
523523
the contents might thus overflow or underflow the containing block).
524-
525524

526525
Note: These rules specify the previously-undefined behavior of this cyclic case in <a href="https://www.w3.org/TR/CSS2/visudet.html#the-width-property">CSS2&sect;10.2</a>.
527526
Note also, the behavior in <a href="https://www.w3.org/TR/CSS2/visudet.html#the-height-property">CSS2&sect;10.5</a>
528527
is superseded in their respective specifications for layout modes
529528
(such as <a href="http://www.w3.org/TR/css-flexbox/">flex layout</a>)
530529
not described in CSS2.
531530

531+
Similarly, percentage margins and padding behave as zero in such cyclic cases
532+
when calculating the containing block's size,
533+
and then resolve when calculating the used sizes and positions of its content.
534+
(This defines the previously-undefined behavior of this cyclic case in
535+
<a href="https://www.w3.org/TR/CSS2/box.html#margin-properties">CSS2&sect;8.3</a>
536+
and
537+
<a href="https://www.w3.org/TR/CSS2/box.padding-properties">CSS2&sect;8.4</a>.
532538

533539
<div class="example">
534540
For example, in the following markup:

0 commit comments

Comments
 (0)