Skip to content
Discussion options

You must be logged in to vote

I was able to find the solution.

The issue wasn't with NextJS but styled-jsx component.

The solution was using the one-off global selector.

For some reason using the Global style fails, but using the one-off global selector works.

Global style fails

<style jsx global>{`
  .js-focus-visible :focus:not(.focus-visible) {
    outline: none;
  }
`}</style>

But One-off global selector works

<style jsx>{`
  :global(.js-focus-visible) :focus:not(.focus-visible) {
    outline: none;
  }
`}</style>

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by aquaductape
Comment options

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

@ysun62
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #14479 on June 23, 2020 08:52.