Skip to content

Commit

Permalink
docs: add docs around component tokens to migration guide (#16129)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonjoseph committed Apr 3, 2024
1 parent 5bd4f4a commit 5fc4fb6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions docs/migration/v11.md
Expand Up @@ -1878,6 +1878,23 @@ const { white, g10, g90, g100 } = v10;
counterpart.
- **Deprecated:** v10 token was removed in v11.

V11 introduces the idea of
[component tokens](https://github.com/carbon-design-system/carbon/blob/main/packages/styles/docs/sass.md#component-tokens)
for tokens specific to a particular component; for example button, tag or
notification. If you'd like to use these component tokens in your stylesheet,
you'll need to `@use` them:

```scss
@use '@carbon/styles/scss/components/button';

.my-selector {
background: button.$button-primary;
}
```

Read more about using or customizing
[component tokens](https://github.com/carbon-design-system/carbon/blob/main/packages/styles/docs/sass.md#component-tokens).

| V10 token name | V11 token name | V11 Contextual token | Status |
| ------------------ | ------------------------- | ---------------------- | ---------- |
| active-danger | button-danger-active || Updated |
Expand Down
2 changes: 1 addition & 1 deletion packages/styles/docs/sass.md
Expand Up @@ -400,7 +400,7 @@ synonymous - `@carbon/react` re-exports everything from `@carbon/styles`.**
| treeview | `@use '@carbon/styles/scss/components/treeview';` | [`scss/components/treeview`](../scss/components/treeview) |
| ui-shell | `@use '@carbon/styles/scss/components/ui-shell';` | [`scss/components/ui-shell`](../scss/components/ui-shell) |

**Component tokens**
#### Component tokens

In some situations, you may want to change the tokens for a specific component.
To do so you will need to configure the modules and provide the tokens you would
Expand Down

0 comments on commit 5fc4fb6

Please sign in to comment.