Css Selector Best Practices
Css Selector Best Practices
_georgemoller
C S S
S E L E C TO R S
B E S T
PRACTICES
01
George Moller
_georgemoller
Selector Intent
Selector Intent is the process of deciding and defining what
you want to style and how you will go about selecting it.
e.g. If we want to select the main navigation menu:
Selector Intent
Reusability
Everything you choose, from the type of selector to its name,
should lend itself toward being reused.
03
George Moller
_georgemoller
Location Independence
Don’t style things based on where they are, but on what they
are.
PErformance
Keep selectors as short as possible, this will keep
specificity down and performance up.