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

fix(website): prop mismatch error with ssr by turning off autoprefixing #426

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

Aslemammad
Copy link
Contributor

@Aslemammad Aslemammad commented Jan 25, 2024

fixes prop mismatch error with ssr in #344

In transformIndexHtml, waku will transform and return the result to the browser! In this process, vite will apply its transformation which postcss/autoprefixer is part of. Autoprefixer will add the -moz- pseudo-class.
A better solution will be an upstream one, in the bright package which should use autoprefixer control comments and disable the prefixing to the inline CSS part that React will process.

With this PR's solution, what we do is just disable the prefixing for the whole website.

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

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

  </style>

Copy link

vercel bot commented Jan 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Jan 25, 2024 1:11pm

Copy link

codesandbox-ci bot commented Jan 25, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 191b780:

Sandbox Source
Vanilla Typescript Configuration
React Configuration
React TypeScript Configuration

@Aslemammad Aslemammad changed the title fix(website): turn off prefixer for now fix(website): prop mismatch error with ssr by turning off autoprefixing Jan 25, 2024
@dai-shi dai-shi merged commit d9dc12e into dai-shi:main Jan 25, 2024
28 checks passed
@dai-shi dai-shi mentioned this pull request Jan 25, 2024
4 tasks
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

Successfully merging this pull request may close these issues.

2 participants