Closed
Description
Nature of issue?
- New feature request
New feature details:
Currently, CSS is written using SASS and stored together in /client/styles/.
This means re-use happens by re-using classes, which makes it hard to see exactly which component is using the styles and making changes error-prone. Styles are global and so may interact with each other in strange ways.
I propose that we move styles to be local to a component. e.g. a <Button />
component would contain all the styles it uses nearby. Styles would not apply globally, so reuse would happen by using the Button component, or by splitting components into smaller ones to be used elsewhere.
Potential choices
- styled-components
- CSS Modules
- CSS Modules with PostCSS plugins
- SASS Modules
- emotion
Considerations:
- maintainability
- easy of use
- theming
- learning curve for new users
- support for server rendering
- output approach (single CSS files, inline etc)
Metadata
Metadata
Assignees
Labels
No labels