Skip to main content

+pseudo-element

Even pseudo-elements are considered separate elements and, just like an element, they must be registered in the register section and then in the same order and in the same depth in the component code.

The pseudo-element must be placed before the elements and it is not necessary to use the prefix :: in the selector (but you can). You can use all pseudo-element selectors such as before, after, first-letter, first-line, placeholder, selection...

+component('button')
+register
+pseudo-element('before')
+element('.text')
+pseudo-element('after')

display: inline-block

+____________________________
+pseudo-element('before')
vertical-align: middle

+____________________________
+element('.text')
font-size: 1.2em

+____________________________
+pseudo-element('after')
content: ''