Changing the default format of classnames assigned to CSS modules
See original GitHub issueIs there any way to change the default format of the classnames for the imported CSS modules without ejecting? Sorry if there’s already a question regarding this. I tried searching for it in the issues.
I’m talking about this [filename]\_[classname]\_\_[hash]
written here
$ create-react-app --version
2.0.3
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
using css modules how do I define more than one style name
You can add multiple classes using css modules as follows: className={`${styles.description} ${styles.yellow}`}. e.g.
Read more >Using CSS Modules in React - OpenReplay Blog
A different way to work with CSS styling in React apps. ... You only need to change the CSS file name to “[filename].Modules.css”;...
Read more >Seamless mapping of class names to CSS modules inside of ...
Default : throw . Defines the desired action when styleName cannot be mapped to an existing CSS Module. Available options: throw throws an...
Read more >What are CSS Modules and why do we need them?
According to the repo, CSS modules are: CSS files in which all class names and animation names are scoped locally by default. So...
Read more >A deep dive into CSS Module - LogRocket Blog
According to the official CSS Module GitHub repository, a CSS Module is a CSS file in which all class names and animation names...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, yeah we don’t let you change it. You can eject if you feel strongly, but I’d advise against it because no one ever sees them (you don’t even need to see them unless you’re inspecting something).
It would be great if create-react-app also supported
[hash]
format in CSS Modules.