Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor New Dashboard's common CSS styles #14670

Open
jesusbotella opened this issue Feb 15, 2019 · 1 comment
Open

Refactor New Dashboard's common CSS styles #14670

jesusbotella opened this issue Feb 15, 2019 · 1 comment
Assignees

Comments

@jesusbotella
Copy link
Contributor

jesusbotella commented Feb 15, 2019

Currently, our CSS styles are split into two folders of the repository: CSS in .vue files within components and common styles for the application which are located in /assets/stylesheets/new-dashboard.

Given that our New Dashboard project is a self-contained project within cartodb JavaScript assets, it makes sense to move those separated styles to the New Dashboard folder and have them located all together.

Leveraging that change, we can set up a proper CSS scaffolding following any of the architectures that make sense for us (like 7-1 CSS architecture). Separating styles by concerns, instead of them being unorganized.

As an extra ball, it could be great if we could use BEM for all those common styles which are not scoped and may require a bit of effort when naming them to avoid classes collision.

To summarize:

  1. As a first step, we need to move the styles from /assets/stylesheets/new-dashboard to lib/assets/javascripts/new-dashboard/styles folder.
  2. Setup a CSS scaffolding to create a good CSS separation.
  3. Rewrite the CSS classes naming to be BEM compliant.
@VictorVelarde
Copy link
Contributor

VictorVelarde commented Feb 15, 2019

IMO it would be nice to split our work for this issue in at least two PRs:

  • a shorter one, related to the movement and review of current styles (its result could be just the folder change and some internal notes on it). --> Relocate styles to the New Dashboard folder

  • another one on the bigger reorganization, using ITCSS (or alike) and BEM. This can have two parts:

    • a little proposal description (that could be discussed here)
    • an implementation in a different PR, having a clear list of affected components

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants