Skip to content

[css-position][quirks] Should positon: sticky avoid the percentage height calculation quirk? #12422

Open
@Loirooriol

Description

@Loirooriol

https://quirks.spec.whatwg.org/#the-percentage-height-calculation-quirk

In quirks mode, for the purpose of calculating the height of an element element, if the computed value of the position property of element is relative or static, [...] the containing block of element must be calculated using the following algorithm, aborting on the first step that returns a value:

It only mentions position: relative or static, but I guess this was written before the introduction of position: sticky. https://drafts.csswg.org/css-position-3/#stickypos-insets

Sticky positioning is pretty much identical to relative positioning, except for the interpretation of the inset properties. So if relative positioning has the quirk, I think sticky positioning should have it too.

All 3 major browsers agree: position: sticky does not avoid the quirk.

<!-- quirks -->
<div>
  <div style="height: 50%; background: cyan; position: sticky">foo</div>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions