W3C home > Mailing lists > Public > www-style@w3.org > February 2015

Re: [css-display] display: contents and ::before/::after

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 11 Feb 2015 00:00:09 +1100
Message-ID: <CAAWBYDDsB+tSk15n2XyUHdVW98K2PbjEOjjos5js=YtPpCXpQw@mail.gmail.com>
To: Alan Stearns <stearns@adobe.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>
On Tue, Feb 10, 2015 at 2:48 PM, Alan Stearns <stearns@adobe.com> wrote:
> On 2/9/15, 7:10 PM, "fantasai" <fantasai.lists@inkedblade.net> wrote:
>>If an element has 'display: contents', does it still generate
>>::before/::after?

I assume so, but I'd be fine if that was complicated or something and
we didn't do it.

> If it does (and I’m not sure why it wouldn’t) there are some interesting
> implications. In Firefox 38, setting ::before and ::after on a flex item,
> then giving the flex item display:contents appears to promote the ::before
> and ::after to be flex items:

Yeah, ::before on the flex container becomes a flex item, no reason
the promoted ::before of a display:contents child wouldn't.

~TJ
Received on Tuesday, 10 February 2015 13:00:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC