Skip to content
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

React mismatch errors #39

Open
Aslemammad opened this issue Jan 25, 2024 · 0 comments
Open

React mismatch errors #39

Aslemammad opened this issue Jan 25, 2024 · 0 comments

Comments

@Aslemammad
Copy link

Hey, Thank you for the great package! We're using Bright in Waku and we stumbled upon a bug with autoprefixer where the inline styles get prefixed and React on the client side will have a mismatch error.

What renders in the server with no prefixing. This is also the client's result.

<style>
[data-bright-theme] ::selection { background-color: var(--selection-background) }
  </style>

Server, but after prefixing.

<style>
  [data-bright-theme] ::-moz-selection { background-color: var(--selection-background) }
[data-bright-theme] ::selection { background-color: var(--selection-background) }

  </style>

For us, the temporary solution was to disable autoprefixer for the official website. dai-shi/waku#426

What can be done in bright itself, is using control comments https://github.com/postcss/autoprefixer?tab=readme-ov-file#control-comments and disabling autoprefixing for that specific inline style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant