Tychio
Tychio

Reputation: 627

Can I nest the pseudo-element after?

I found it from W3C. http://www.w3.org/TR/css3-content/#nesting

4.2.1. Nesting '::before' and '::after' pseudo-elements

The selector '::before::before' represents a pseudo-element contained at the start of a pseudo-element contained at the start of an element. For example, the following rules: div { content: 'A' } div::before { content: 'B'; } div::before::before { content: 'C'; } ...would result in the following rendering objects:

,-----------------------.
| ,---------.           |
| | ,---.   |           |
| | | C | B | A         |
| | `---'   |           |
| `---------'           |
`-----------------------'

But it was not work in Chrome 30. http://codepen.io/tychio/pen/pLDqm

So I just want to ask how can use after or before to nest.

Upvotes: 5

Views: 5196

Answers (1)

Danield
Danield

Reputation: 125463

True, that module was proposed, but unfortunately not implemented by any browser.

So for now you can't do this.

Edit: Just found this post

Upvotes: 5

Related Questions