在MDN中::: before/:: after + flexbox [英] ::before/::after + flexbox in MDN
问题描述
我在 MDN CSS 主页上看到以下新闻:
I see the following news item on MDN CSS homepage:
Gecko对柔性盒的支持已进行了调整,以匹配最近的规范说明:从Firefox 23开始,
::before
和::after
将是flex项目,因此可以使用order
和align-self
重新定位.
(2013年5月3日)
Gecko's support of flexible boxes has been adapted to match a recent specification clarification: from Firefox 23
::before
and::after
will be flex items, and as such can be repositioned usingorder
andalign-self
.
(May 3rd, 2013)
它指的是什么规格?
我在 CSS灵活框布局模块中找不到对::before
/::after
的任何引用.
What specification does it refer to?
I cannot find any references to ::before
/::after
in CSS Flexible Box Layout Module.
推荐答案
这是在 bug 867454 .正如评论#0所言,不执行它是一个错误.
This was implemented in bug 867454. Not implementing it was a mistake, as comment #0 tells.
规范说:
flex容器的内容由零个或多个flex项组成:flex容器的每个流入子元素都将成为一个flex项,而直接包含在flex容器中的每个连续文本都被包裹在一个匿名中弹性项目.
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.
而且确实包含::before
/::after
伪元素(至少现在,mozilla人士以这种方式解释它,我同意).
And that does include ::before
/::after
pseudo elements (at least the mozilla folks interpret it this way now, and I'd concur).
针对开发人员的Firefox 23" 也提供了此信息,明确引用了到::before
和::after
作为流入".
"Firefox 23 for developers" also features this information, explicitly referring to ::before
and ::after
as "in-flow".
流中:: after和:: before伪元素现在是flex项目(错误867454).
In-flow ::after and ::before pseudo-elements are now flex items (bug 867454).
这篇关于在MDN中::: before/:: after + flexbox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!