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.

Styles doesn't apply when using with CSS Modules

See original GitHub issue

I’ve tried using the sample code: https://github.com/fkhadra/react-toastify#usage in my React app (which is using CSS Modules) but the styles are not being applied.

This line import 'react-toastify/dist/ReactToastify.css'; points to a CSS file which is already processed and converted to plain CSS class names.

Note: Removing CSS Modules config it works fine!

Now I wonder what I’m missing from the docs to put this to work in my react app.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
nikolalukoviccommented, Oct 24, 2018

I believe the readme file should be updated with the information given in this thread to give a heads up to those who use css modules.

1reaction
fkhadracommented, Oct 4, 2018

Thanks for the feedback, i’ll close the issue then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why CSS Modules styling is not working on my elements ...
You will use some css to different page and sometimes you will use same css class name. Same class name will make css...
Read more >
Global vs. Local Styling In Next.js - Smashing Magazine
Any styling that doesn't make sense to add as a utility class, we can add into component styles using CSS modules. As a...
Read more >
Component-Scoped Styles with CSS Modules - Gatsby
CSS Modules let you write styles in CSS files but consume them as JavaScript objects for additional processing and safety.
Read more >
Solving the React Error: Not Picking Up CSS Style | Pluralsight
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >
CSS Modules by Example - JavaScript Stuff
You can use short, descriptive names like "button" without worrying about name ... in your CSS Module, and reference the class with styles.button...
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