8000 [css-flexbox] Example 3 (on abspos flex items) mistakenly says `align-content` when it means `align-self` · Issue #436 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-flexbox] Example 3 (on abspos flex items) mistakenly says align-content when it means align-self #436

@dholbert

Description

@dholbert

Filing a bug on a typo in flexbox spec section 4.1. Absolutely-Positioned Flex Children -- specifically, Example 3 inside that section.

Example 3 says:

...if you set, for example, align-content: center; on an absolutely-positioned child of a flex container, auto offsets on the child will center it in the flex container’s cross axis.

I'm 95% sure that means to say align-self, NOT align-content, for several reasons:

  • This spec-text talking about applying this style on the child, with the intention of centering the child. That's precisely what the *-self properties do -- position the thing they're applied to -- whereas the *-content properties control alignment inside of the thing they're applied to.
  • If the flex container is single-line (seems like a reasonable possibility, though Example 3 doesn't specify), another piece of the spec explicitly says that "align-content has no effect" (because it's about aligning flex lines -- and in a single-line flexbox, "the cross size of the line is the cross size of the flex container" which means there's nothing for align-content to do).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0