Skip to content

[css-flexbox] Absolute Positioned Elements in Flex Containers Removes Common Layout Patterns #401

@jlukic

Description

@jlukic

https://drafts.csswg.org/css-flexbox/#abspos-items

Currently Flexbox spec does not allow absolutely positioned elements inside a flex container to preserve their calculated position when using top: auto; or left:auto; (its initial value).

Here's an example of this behavior in both flex and normal containers.
https://jsfiddle.net/91tn25zn/

Outside of flex containers using auto positioning values behaves this way, so this is new behavior added in flex.

This behavior inside flex containers removed a very important method for positioning elements in CSS, allowing elements to exist outside of page flow but preserve their calculated positions. For example this breaks all vertical dividers in Semantic UI which represents a common design pattern of adding elements which do not participate in layout, but are used for styling based on their rendered position.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions