Skip to content

[css-position][css-align] How do other alignments affect the inset-modified containing block? #6607

Closed
@Loirooriol

Description

@Loirooriol

https://drafts.csswg.org/css-position/#abspos-insets says

If both inset properties in a given axis are auto, then, depending on the box’s self-alignment property in the relevant axis:

  • for self-start alignment or its equivalent
    Set its start-edge inset property to the static position, and its end-edge inset property to zero.
  • for self-end alignment or its equivalent
    Set its end-edge inset property to the static position, and its start-edge inset property to zero.
  • for center alignment
    ...

What should happen for other alignments? Like, the initial justify-self is auto, which is typically normal. https://drafts.csswg.org/css-align-3/#justify-abspos

For all other absolutely-positioned boxes, normal behaves as stretch.

So what's the inset-modified containing block for stretch? Are we instead supposed to use https://drafts.csswg.org/css-align-3/#abspos-sizing ?

Treat normal as start

That seems to match implementations. But what if I specify justify-self: stretch explicitly?

This is all very confusing because both css-position and css-align monkeypatch both css2 and each other.

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