Skip to content

Component styles #1215

Closed
Closed
@andrewn

Description

@andrewn

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

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions