selectivizr
selectivizr copied to clipboard
:before and :after cannot be used with :nth-child, :nth-of-type, etc
:before and :after cannot be used with CSS3 selectors such as :nth-child, :nth-of-type, first-of-type, :last-child, ...... etc.
For example, these aren't working:
div:nth-child(2):before { }
div:last-child:after { }
div:nth-of-type(3):after { }
Isn't a solution, but if you use two tags, do works.
.field-item:last-child span:after
Thanks.
Actually it can be fixed by changing line 263 (or line 270 of v1.0.3b):
var domSelectorText = selectorText.replace(RE_LIBRARY_INCOMPATIBLE_PSEUDOS, EMPTY_STRING);
To
var domSelectorText = selectorText.replace(RE_LIBRARY_INCOMPATIBLE_PSEUDOS, EMPTY_STRING).replace(/:before|:after/, '');