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

Importing the same CSS more than once #6

Open
oliverjam opened this issue Sep 18, 2020 · 0 comments
Open

Importing the same CSS more than once #6

oliverjam opened this issue Sep 18, 2020 · 0 comments

Comments

@oliverjam
Copy link

import "../App.css";

You don't need to re-import a CSS file that was already imported by another JS file. This will probably cause two copies of the CSS to end up on the page, which is probably not what you want.

Since CSS is a global language any selectors that are included on the page will apply anywhere. E.g. if App.css has a .red { color: red; } class you can apply that class to any element, no matter what JS file it's rendered in.

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