::before/::after + flexbox in MDN

前端 未结 1 1454
隐瞒了意图╮
隐瞒了意图╮ 2021-01-01 01:16

I see the following news item on MDN CSS homepage:

Gecko\'s support of flexible boxes has been adapted to match a recent specification clarification:

相关标签:
1条回答
  • 2021-01-01 01:39

    This was implemented in bug 867454. Not implementing it was a mistake, as comment #0 tells.

    The spec says:

    The contents of a flex container consists of zero or more flex items: each in-flow child of a flex container becomes a flex item, and each contiguous run of text that is directly contained inside a flex container is wrapped in an anonymous flex item.

    And that does include ::before/::after pseudo elements (at least the mozilla folks interpret it this way now, and I'd concur).

    "Firefox 23 for developers" also features this information, explicitly referring to ::before and ::after as "in-flow".

    In-flow ::after and ::before pseudo-elements are now flex items (bug 867454).

    0 讨论(0)
提交回复
热议问题