You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclassName={styles.green}>green</p><pclassName={styles.yellowbg}>yellowbg</p><pclassName={styles.red}>red</p><pclassName={styles.orangebg}>orangebg</p><divclassName={styles.yellowbg}><pclassName={styles.green}>green in yellowbg</p></div><divclassName={styles.orangebg}><pclassName={styles.red}>red in orangebg</p></div>
Description
I'm making use of the CSS nesting at-rule, which I believe is provided to us by cssnext.
I noticed some things which were working in development were broken when I built my site, and I traced it to the at-rule.
When in a CSS module, classes which only appear under a
@nest
are dropped during the build.Steps to reproduce
Check out this repository, which is the basic starter with a few elements and a CSS module added.
https://github.com/tremby/gatsby-nest-bug
In particular, the test code is:
With CSS
Run it in development mode and see the output. Then build it and view again.
Expected result
both in development and when built.
Actual result
The correct result when in development, and the following when built.
The line "green in yellowbg" should be on a yellow background.
The line "red in orangebg" is working, but only because I added a stub
.orangebg {}
rule.Environment
npm list gatsby
): [email protected]gatsby --version
): 1.1.41File contents (if changed):
gatsby-config.js
: not changedpackage.json
: not changedgatsby-node.js
: not changedgatsby-browser.js
: not changedgatsby-ssr.js
: not changedThe text was updated successfully, but these errors were encountered: