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

Display missing styleName anyway? #135

Closed
morgs32 opened this issue Oct 27, 2017 · 6 comments
Closed

Display missing styleName anyway? #135

morgs32 opened this issue Oct 27, 2017 · 6 comments
Labels

Comments

@morgs32
Copy link

morgs32 commented Oct 27, 2017

This probably belongs on stackoverflow... but maybe this is a feature request

Is there a way to have handleMissingStyleName just provide the className anyway? Sort of like identity-obj-proxy?

Or is there anyway you can think of to get this functionality? Another babel plugin perhaps?

@IanVS
Copy link
Contributor

IanVS commented Nov 1, 2017

Interesting. I'm curious, what is your use case for wanting this behavior?

@gajus
Copy link
Owner

gajus commented Nov 1, 2017

Interesting. I'm curious, what is your use case for wanting this behavior?

I am guessing to visually mark objects as missing the style name.

@morgs32
Copy link
Author

morgs32 commented Nov 2, 2017 via email

@IanVS
Copy link
Contributor

IanVS commented Nov 2, 2017

If you know which styles are going to be provided by the customers, could you use className for those, and styleName for the ones that you're providing? Or, do you not know ahead-of-time which styles they will be overriding?

@gajus
Copy link
Owner

gajus commented Nov 2, 2017

Sounds like misuse of CSS modules. If customers are expected to provide their own stylesheets, then using className for customer classes and styleName for default classes.

If the intent is that the default styles must not be use in case user styles are provided, then you might be better off with completely different solution than CSS modules, e.g. styled-components.

@morgs32
Copy link
Author

morgs32 commented Mar 17, 2020

Good points all around

@morgs32 morgs32 closed this as completed Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants