- Don't use classes in html based on styles
- i.e. instead of
.table .table-lined .shift-right .moar-styling
useuser-table
and use sass%placeholders
instead.
- i.e. instead of
- Place
@media
queries within each related component - Use
em
's and rem's instead ofpx
. (there's handy sass functions to convert px) - 99% of the time, avoid
table
s. instead, usediv
s to avoid the underlying styling challenges when usingtable
. - Don't nest reusable styles in shared scss files. This makes it difficult to see the impact of what styles are inherited and forces the consumer to override unwanted nested styles.
- Booleans should start with a verb like
isVisible
canOpen
shouldClose
- Use absolute paths in js imports
- Use when possible:
- arrow functions
- pure functions
async/await