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

[BUG] False classname detections on *.module.css #360

Open
Pnlvfx opened this issue Sep 20, 2024 · 0 comments
Open

[BUG] False classname detections on *.module.css #360

Pnlvfx opened this issue Sep 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Pnlvfx
Copy link

Pnlvfx commented Sep 20, 2024

I want to start saying that I love this plugin, and the reason why I end up using tailwind in all of my project is also thanks to this plugin.
However I've noticed that the plugin, while reading custom css classes on css files, will also read all module.css classes, which is not right as a module.css file should be imported and used like:

import styles from '*.module.css'

so that class doesn't really exist if used as a classic css.

I'll provide an example to clarify what I mean because I'm not english so it could be that I've written some incompresible text.

header.module.css

.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
-webkit-overflow-scrolling: touch;
}

<div className="no-scrollbar"></div> // will not trigger a missing class

however the header.module.css is meant to be used as

import styles from './header.module.css';

<div className={styles['no-scrollbar']}></div>

@Pnlvfx Pnlvfx added the bug Something isn't working label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant