Skip to content

[css-position] sticky should be attached to parent with overflow-x or overflow-y depending on top/bottom and left-right #9140

Description

@yelhouti

The current Spec says:

"its offsets are automatically adjusted in reference to the nearest ancestor scroll container’s scrollport "..." in whichever axes the inset properties are not both auto".

This doesn't work great when you have a table where you want your header to stick to the top of the document, but a column, to sticky only to the table.
You would want the table or table's container to have an overflow-x: auto to enable horizontal scrolling, and have the column stick to that with left: 0 or right: 0. But you would want the table header to stick to the top of the page or the the main container of the page (ie: parent with overflow-y: auto) and not the table or it will never be visible.

Related issues comments:
#865
#865 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions