Open Bug 1377201 Opened 7 years ago Updated 4 days ago

min-content sizing doesn't seem to account for padding-right on inline-level descendant

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

Tracking Status
firefox57 --- wontfix

People

(Reporter: dholbert, Unassigned)

References

Details

Attachments

(2 files)

Attached file testcase 1
STR:
 1. Load attached testcase.

EXPECTED RESULTS:
Nothing should be protruding from the black bordered boxes. They are min-content sized, which means they should be wide enough so that its contents shouldn't need to overflow.

ACTUAL RESULTS:
The second one (the orange one) overflows from its black bordered container.  (This one has "padding-right" on a descendant.)
Chrome 55 and Safari 10.1 seem to get this wrong, too, though they're different from our flavor of wrong.

They render the first bordered box too skinny for its content (whereas we seem to get that one right).  And they just don't render any color at all for the padding on the orange element (the second bordered box), though they do set aside space for it.
Here's a similar testcase that just uses a flexbox to trigger min-content sizing, rather than using the explicit -[vendor]-min-content keywords.

(Flexbox shrinks its items down to their min-content sizes if there's not enough space for all of its items to fit, as long as their "flex-shrink" and "min-width" [or min-height] properties are at default values.)
Edge 15 seems to get this correct, at first glance at least.  Ignore them for testcase 1, because they don't support min-content sizing keywords AFAICT -- but on testcase 2, Edge's rendering has the following nice behaviors:
 - The space that's been reserved for padding is all colored in correctly. (unlike Chrome)
 - There's no overflow. (unlike Chrome)
 - There's no linewrapping. (unlike Firefox)
Flags: webcompat?
Priority: -- → P3
Flags: webcompat?
Webcompat Priority: --- → ?
Webcompat Priority: ? → P3
Severity: normal → S3

The linked webcompat issue https://webcompat.com/issues/6405 is now fixed, unsetting the webcompat priority.

Webcompat Priority: P3 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: