mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Treat % as 0 for the min-content contribution of replaced elements (#32103)
`width` and `max-width` typically treat expressions with percentages as their initial value, but for the min-content contribution of replaced elements, they should instead be treated as zero. https://drafts.csswg.org/css-sizing-3/#replaced-percentage-min-contribution Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
dd9164f49a
commit
1c321a17ac
6 changed files with 87 additions and 11 deletions
|
@ -431,6 +431,7 @@ fn compute_inline_content_sizes_for_block_level_boxes(
|
|||
containing_block,
|
||||
&LogicalVec2::zero(),
|
||||
false, /* auto_block_size_stretches_to_containing_block */
|
||||
false, /* is_replaced */
|
||||
false, /* is_table */
|
||||
!matches!(base.style.pseudo(), Some(PseudoElement::ServoAnonymousBox)),
|
||||
|_| None, /* TODO: support preferred aspect ratios on non-replaced boxes */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue