Bug 321268
| Summary: | height: fit-content is broken when position: fixed is used | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alex <alexander> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 26 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Alex
Create this layout:
<section>
I am some real content
<div></div>
</section>
Apply these styles:
section {
height: fit-content;
}
div {
height: 100%;
}
Everything works as expected.
Now add "position: fixed" to section and its height becomes double the size because DIV adds another 100% of the height.
Works properly in all other browsers, but Safari, see this Codepen:
https://codepen.io/waterplea/pen/KwaEgJE
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/184375810>
alan
Thank you for filing this bug report. I think it has already progressed on trunk. Let me find the progression point.
alan
Progressed at https://commits.webkit.org/311084@main.
*** This bug has been marked as a duplicate of bug 289876 ***