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

feat(styles): add support for a compat theme #9235

Merged
merged 14 commits into from
Jul 28, 2021

Conversation

joshblack
Copy link
Contributor

Closes #9176

Add in support for a compatibility theme in @carbon/styles. This should allow teams to use both v10 and v11 tokens together during migration.

The usage is outlined in styles/docs/sass.md, but the tl;dr is that a team can do the following:

@use '@carbon/styles/scss/compat/themes' as compat;
@use '@carbon/styles/scss/themes';
@use '@carbon/styles/scss/theme' with (
  $fallback: themes.$g100,
  $theme: compat.$g100,
);

body {
  // v11 token
  background: theme.$background;
  // v10 token
  color: theme.$text-01;
}

Changelog

New

  • Add two new builders for compat themes and tokens entrypoints

Changed

  • Update docs for styles to include the compat entrypoint

Removed

Testing / Reviewing

  • Verify tests pass as expected
  • Review docs and make sure they make sense and match usage in compat-test.js

@joshblack joshblack requested a review from a team as a code owner July 20, 2021 20:55
@netlify
Copy link

netlify bot commented Jul 20, 2021

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: 65c2751

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/6101788d965fc70007f51f15

😎 Browse the preview: https://deploy-preview-9235--carbon-react-next.netlify.app

@netlify
Copy link

netlify bot commented Jul 20, 2021

✔️ Deploy Preview for carbon-components-react ready!

🔨 Explore the source changes: 65c2751

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/6101788d467fa80008852200

😎 Browse the preview: https://deploy-preview-9235--carbon-components-react.netlify.app

@netlify
Copy link

netlify bot commented Jul 20, 2021

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: 65c2751

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/6101788d568aa4000a2c607e

😎 Browse the preview: https://deploy-preview-9235--carbon-elements.netlify.app

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! 🎉 🔥

@kodiakhq
Copy link
Contributor

kodiakhq bot commented Jul 26, 2021

This PR currently has a merge conflict. Please resolve this and then re-add the status: ready to merge 🎉 label.

@kodiakhq
Copy link
Contributor

kodiakhq bot commented Jul 26, 2021

This PR currently has a merge conflict. Please resolve this and then re-add the status: ready to merge 🎉 label.

@kodiakhq kodiakhq bot merged commit 5214919 into carbon-design-system:main Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add compatibility theme to support v10 tokens in v11
3 participants