Skip to content

[css-flexbox] clarify whether collapsed flex items influence the flex container's intrinsic main size #5985

Closed

Description

@dholbert

The "flex container intrinsic main sizes" spec-text (section 9.9.1) doesn't currently say anything special about excluding or special handling for collapsed flex items. It probably should.

I think they are intended to have zero contribution to the container's main size, based on a side-comment in the "Collapsed Items" section, section 4.4 -- that section says: "...collapsing or uncollapsing items may change the flex container’s main size", but never says precisely how. (That section does say that these items turn into zero-main-size "struts", but that happens after the container's intrinsic sizing.)

Probably https://drafts.csswg.org/css-flexbox-1/#intrinsic-main-sizes step 1 needs:

s/For each flex item/For each flex item (excluding collapsed flex items)/

...or something along those lines.

Activity

  1. dholbert commented on Feb 12, 2021

    @dholbert
    MemberAuthor

    actually, step 3 is the most important step to adjust: add each item’s flex base size to the product of [...]. We need to define things such that this added quantity ends up at 0, for collapsed flex items (or simply exclude collapsed flex items from the "add each item's..." operation here.)

  2. dholbert commented on Feb 12, 2021

    @dholbert
    MemberAuthor

    I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1692366 on fixing this in Firefox/Gecko (to exclude collapsed items from the container's main-axis intrinsic sizing)

  3. fantasai commented on Jun 9, 2021

    @fantasai
    Collaborator

    @dholbert Edits checked in, let us know if we missed anything?
    Agenda+ to verify with the CSSWG.

  4. dholbert commented on Jun 16, 2021

    @dholbert
    MemberAuthor

    The edits look good to me. Thanks!

  5. css-meeting-bot commented on Jun 16, 2021

    @css-meeting-bot
    Member

    The CSS Working Group just discussed Flexbox, and agreed to the following:

    • RESOLVED: Accept edits
    The full IRC log of that discussion <fantasai> Topic: Flexbox
    <TabAtkins> github: https://github.com//issues/5985
    <fantasai> github: https://github.com//issues/5985
    <fantasai> TabAtkins: just got approval from dholbert so probably easy
    <chrishtr> I need to follow up some more on issue 5896, let's cover it another time.
    <fantasai> TabAtkins: dholbert noticed that collaped flex items aren't explicitly excluded from intrinsic size calculation
    <fantasai> TabAtkins: so we updated to explicitly skip those items
    <fantasai> commits are https://github.com/w3c/csswg-drafts/commit/60ffc4058780d832d880a076fe02788f0cc6e8a7
    <fantasai> TabAtkins: We made the fix, just wanted WG confirmation it's OK
    <cbiesinger> I haven't read the text but your description sounds good
    <fantasai> astearns: proposal to accept?
    <fantasai> RESOLVED: Accept edits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to 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