Next.js Discord

Discord Forum

scss with css modules

Answered
gin posted this in #help-forum
Open in Discord
ginOP
Hey guys, i would like to know how i can reference nested classes.
Example i have a .button class and inside that i have &.active
tsx -> styles.button active
Answered by gin
this worked for me=
<div className={`${styles.button} ${styles.active}`}>
                            Home
                        </div>
View full answer

4 Replies

Prolly checkout this ^
@averydelusionalperson https://nextjs.org/docs/app/building-your-application/styling/sass
ginOP
this worked for me=
<div className={`${styles.button} ${styles.active}`}>
                            Home
                        </div>
Answer
ginOP
the nested class gets exported aswell