Selectors
CSS selector examples
Prefer using class-based selectors.
To avoid collisions and improve readability, add a prefix to your CSS classes.
Especially if you are not using a framework and that your CSS is global (and not specific to some component).
Pseudo-classes
Pseudo-classes allow you to customize the CSS depending on the context or state of the element (e.g.: is it the first element of a list, is it a checked checkbox etc...).
Last updated