- Don't use classes in html based on styles
- i.e. instead of
.table .table-lined .shift-right .moar-stylinguseuser-tableand use sass%placeholdersinstead.
- i.e. instead of
- Place
@mediaqueries 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
tables. instead, usedivs 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
isVisiblecanOpenshouldClose - Use absolute paths in js imports
- Use when possible:
- arrow functions
- pure functions
async/await