Skip to content
Discussion options

You must be logged in to vote

That error is occurring because you are importing global.scss into NavBar.module.scss. SCSS/CSS modules cannot have element selectors in the top level like that.

You must always use a selector with CSS modules. So if you want to apply styles to <nav> you would have to give it a className. The only alternative would be if you had a wrapping element you applied a class to:

<div className={styles.wrapper}>
  <nav>
.wrapper {
  nav {
    // styles
  }
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@websocket98765
Comment options

@jamesmosier
Comment options

Answer selected by Leviathan91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants