Styling
Use styled-components¶
We now use styled-components for styling rather than using SASS/SCSS.
Any new work should be written using styled-components, and rewriting existing components away from SASS/CSS is highly encouraged.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Use theme for colours, fonts etc¶
Do not hardcode colours, fonts etc inside styled components. Instead
get these from the projects theme using styled-components theme support
Draft
This should be improved with examples once the PR for theming has been merged.
styled-components should not be on a single line¶
Bad
1 | |
Good
1 2 3 4 | |
styled-components should be prefixed with "Styled"¶
Bad
1 2 3 | |
Good
1 2 3 | |