One Invalid Pseudo Selector Equals an Entire Ignored Selector
Perhaps you know this one: if any part of a selector is invalid, it invalidates the whole selector. For example:
div, span::butt {
background: red;
}
Even though div is a perfectly valid selector, span:butt is not, thus the entire selector is invalidated — neither divs nor span::butt elements on the page will have a red background.
Normally that’s not a terribly huge problem. It may even be even useful, depending on the situation. But there are plenty of situations …
The post One Invalid Pseudo Selector Equals an Entire Ignored Selector appeared first on CSS-Tricks.




