-
Notifications
You must be signed in to change notification settings - Fork 30
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
CSS-modules: composes #50
Comments
Thanks! I'm using css modules quite a bit with jetpack, but never used composes. Will have a look at this issue soon. |
Heya, had a quick look, it's an issue with the way the HTML is constructed in your test case, you're missing the quotes around the class name: -<p class=${styles.child}>Should have black BG, red text</p>
+<p class="${styles.child}">Should have black BG, red text</p> Results in: -<p class="styles--child___Ta3_R" styles--parent___1dfVw="">Should have black BG, red text</p>
+<p class="styles--child___Ta3_R styles--parent___1dfVw">Should have black BG, red text</p> Or for better readability, replacing class names with just child and parent: -<p class="child" parent="">Should have black BG, red text</p>
+<p class="child parent">Should have black BG, red text</p> |
Ahh, thanks for taking a look. My test was bad too, sorry for wasting your time. Leaving the following reasoning for the record, in case someone stumbles upon the same mixup.
And I thought that it acts like the webpack css-modules demo with JSX. Apparently it doesn't. |
Ah, I should fix that exampe indeed! |
Jetpack is awesome @KidkArolis !
I have created a test case for CSS-modules here,
npm t
should point it out.CSS-modules seem to work, but I can't get
composes
to inherit properties.No matter what I tried, I couldn't fix it, hence the issue report.
Expected:
Actual:
The text was updated successfully, but these errors were encountered: