Skip to content

Commit 317707d

Browse files
committed
[css-sizing] Per WG resolution, use min size of replaced element, when available, to calculate intrinsic size, rather than defaulting immediately to 300x150. Fixes #1722.
1 parent 99374b4 commit 317707d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

css-sizing-3/Overview.bs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,17 @@ Intrinsic Sizes</h3>
447447
in the <a>inline axis</a>,
448448
use the <a>stretch fit</a> into that size for the inline size
449449
and calculate the block size using the aspect ratio.
450+
* Otherwise
451+
if the box has a <a>definite</a> non-zero 'min-width' or 'min-height',
452+
use that size and calculate the other dimension using the aspect ratio;
453+
if both dimensions have a definite minimum,
454+
choose the one that results in the larger overall size.
455+
456+
Note: This case was previous calculated from a 300x150 default size,
457+
rather than the box's min size.
458+
This is believed to be a better behavior,
459+
and likely to be web compatible,
460+
but please send feedback to the CSSWG if there are any problems.
450461
* Otherwise
451462
use a width of ''300px''
452463
(height of ''150px'' in <a>vertical writing modes</a>)
@@ -456,6 +467,9 @@ Intrinsic Sizes</h3>
456467
* If the <a>available space</a> is <a>definite</a>
457468
in the appropriate dimension,
458469
use the <a>stretch fit</a> into that size in that dimension.
470+
* Otherwise,
471+
if the box has a <a>definite</a> non-zero minimum size ('min-width'/'min-height') in that dimension,
472+
use that size.
459473
* Otherwise,
460474
use ''300px'' for the width
461475
and/or ''150px'' for the height

0 commit comments

Comments
 (0)