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(color-modes): make useRootStyles=false work with useCustomProperties #2519

Merged
merged 15 commits into from
Oct 17, 2024

Conversation

hasparus
Copy link
Member

Closes #2516.

Currently, useRootStyles: false disables adding global CSS Custom Properties even if we have useCustomProperties set to true, so the colors stop working, because color Custom Property values are missing. If you disable useCustomProperties, the colors start coming from React Context, which is why we didn't notice that before.

Copy link

vercel bot commented Oct 16, 2024

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

Name Status Preview Comments Updated (UTC)
theme-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 6:36pm

Copy link

codesandbox-ci bot commented Oct 16, 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 e4e2b70:

Sandbox Source
next-theme-ui-example Configuration
gatsby-plugin-theme-ui-example Configuration

dependabot bot and others added 5 commits October 17, 2024 15:27
Bumps [react-test-renderer](https://github.com/facebook/react/tree/HEAD/packages/react-test-renderer) and [@types/react-test-renderer](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-test-renderer). These dependencies needed to be updated together.

Updates `react-test-renderer` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-test-renderer)

Updates `@types/react-test-renderer` from 18.0.0 to 18.3.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-test-renderer)

---
updated-dependencies:
- dependency-name: react-test-renderer
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/react-test-renderer"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [@babel/register](https://github.com/babel/babel/tree/HEAD/packages/babel-register) from 7.23.7 to 7.24.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.24.6/packages/babel-register)

---
updated-dependencies:
- dependency-name: "@babel/register"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@hasparus hasparus merged commit f9fbb7d into develop Oct 17, 2024
12 checks passed
@hasparus hasparus deleted the fix-root-styles branch October 17, 2024 19:21
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.

useRootStyles: false disables whole theme
1 participant