Skip to content

[css-display-3] Clarify whether display: contents applies to ::before and ::after #1345

Closed
@emilio

Description

@emilio

I have a (probably bitrotted already) implementation for this in Blink, but I talked about this with @dbaron a while ago and asked me to file this in order to clarify it, given Gecko doesn't implement it.

Gecko always treats display: contents in ::before and ::after as display: inline. It's not clear to me whether display: contents in pseudo-elements is really useful at all, and the implementation is complex.

It's pretty much non-observable, except for cases like https://github.com/w3c/web-platform-tests/blob/master/css/css-display-3/display-contents-before-after-002.html (where you specify reset properties on the pseudo, like border).

I think it's nice for consistency, but I wouldn't be too sad if it didn't apply to these pseudo-elements.

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