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

Scss imports #29

Open
trentgoing opened this issue Oct 20, 2020 · 0 comments
Open

Scss imports #29

trentgoing opened this issue Oct 20, 2020 · 0 comments

Comments

@trentgoing
Copy link

import '../../../../dist/stylesheets/QandAstyles.css';

Your styling was a great part of the project. It was interesting, viewing the code, that the same few scss files were being imported in every component. Now that you have a good feel for how styles were managed across the app, take another look at what the best way to manage styling would be, and if you would change anything.

SCSS is doing a lot of work pre-processing your css. It is great to use when defining complex and overarching styles which will then be applied to the project as a whole as you've done here. The benefit of importing styles into each component comes with the idea of component composition and having the styles defined close to the component itself. Here you're mixing the two, defining an overarching style but then importing it individually into each component.

This is vaguely introduced at the beginning here: https://create-react-app.dev/docs/adding-a-sass-stylesheet/

This is not a requirement to refactor or necessary in any way. But read into it and consider what you might do in the future!

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

1 participant