greyhillman / rent-vs-buy

https://greyhillman.github.io/rent-vs-buy/
GNU Affero General Public License v3.0
0 stars 0 forks source link

Refactor CSS files #6

Closed greyhillman closed 2 years ago

greyhillman commented 2 years ago

Problem

While developing, I was often going to multiple SASS files in order to change the CSS of one component.

Also, there's probably a couple places where code that's meant to be doing the same thing is repeated. Those should be consolidated.

Alternative solution

The SASS files should be structured as components. Each React component could have a SASS/CSS/style file for it that's responsible for styling things inside the component. Things that could be styled by the using component should be kept out.

For example, margins should be set on the using component while padding should be done by the used component.

Benefits compared to current solution
Costs compared to current solution