question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Global CSS included with component CSS import

See original GitHub issue

Thanks for this great library!

I tried to use babel-plugin-import to do modular CSS imports, but along with the css for an individual component, there is a lot of global css being imported that interferes with my existing styles. Is it possible to import the CSS for an individual component without global CSS being included?

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:53
  • Comments:89 (19 by maintainers)

github_iconTop GitHub Comments

132reactions
DogAndHerDudecommented, Apr 21, 2017

That’s terrible design though.

110reactions
benjycuicommented, Dec 22, 2016

It’s impossible not to import those CSS rules now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Standard Styling with Global CSS Files - Gatsby
Traditionally, websites are styled using global CSS files. Globally-scoped CSS rules are declared in external .css stylesheets, and CSS specificity and the ...
Read more >
import - CSS: Cascading Style Sheets - MDN Web Docs
The @import CSS at-rule is used to import style rules from other valid stylesheets. An @import rule must be defined at the top...
Read more >
Global vs. Local Styling In Next.js - Smashing Magazine
The answer is surprisingly simple — to write well-structured CSS that balances global and local styling concerns.
Read more >
Basic Features: Built-in CSS Support - Next.js
This behavior makes CSS Modules the ideal way to include component-level CSS. CSS Module files can be imported anywhere in your application. For...
Read more >
Applying global CSS styles in a React app | bobbyhadz
To apply global CSS styles in a React app, write your css in a file with a .css extension and import it in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found