Skip to content

Commit

Permalink
docs: v11 color token updates for tag (carbon-design-system#2346)
Browse files Browse the repository at this point in the history
- This PR updates the color tokens on the Style tab for the tag component.
- Add tag component level tokens 
- Converted `classnames` to normal element names.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and emyarod committed Jun 8, 2021
1 parent 9d61f1a commit a0c3249
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions src/pages/components/tag/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,54 @@ Using the IBM Design Language
[color palette](https://www.ibm.com/design/language/elements/color), the tag
text color should be 5 steps away from the tag background color

| Tag color | Color token |
| ---------- | -------------------- |
| Default | `$tag-background-gray` |
| | `$tag-color-gray` |
| Red | `$tag-background-red` |
| | `$tag-color-red` |
| Magenta | `$tag-background-magenta` |
| | `$tag-color-magenta` |
| Purple | `$tag-background-purple` |
| | `$tag-color-purple` |
| Blue | `$tag-background-blue` |
| | `$tag-color-blue` |
| Cyan | `$tag-background-cyan` |
| | `$tag-color-cyan` |
| Teal | `$tag-background-teal` |
| | `$tag-color-teal` |
| Green | `$tag-background-green` |
| | `$tag-color-green` |
| Gray | `$tag-background-gray` |
| | `$tag-color-gray` |
| Cool gray | `$tag-background-cool-gray` |
| | `$tag-color-cool-gray` |
| Warm gray | `$tag-background-warm-gray` |
| | `$tag-color-warm-gray` |
| High contrast | `$background-inverse` |
| | `$text-inverse` |

## Typography

Tag text should be set in sentence case, and should only have one word. However,
if more than one is necessary, then connect the words using a hyphen with no
spaces.

| Property | Font-size (px/rem) | Font-weight | Type token |
| Element | Font-size (px/rem) | Font-weight | Type token |
| ---------- | ------------------ | ------------- | ----------- |
| `.bx--tag` | 12 / 0.75 | Regular / 400 | `$label-01` |
| Label | 12 / 0.75 | Regular / 400 | `$label-01` |

## Structure

All tags have the same height. However, the width of tags varies based on the
amount of content. All four corners of a tag are rounded with a 24px radius.

| Class | Property | px / rem | Spacing token |
| Element | Property | px / rem | Spacing token |
| ---------- | --------------------------- | -------- | ------------- |
| `.bx--tag` | height | 24 / 1.5 ||
| `.bx--tag` | radius | 24px ||
| `.bx--tag` | margin | 8 / 0.5 | `$spacing-03` |
| `.bx--tag` | padding-left, padding-right | 8 / 0.5 | `$spacing-03` |
| Tag | height | 24 / 1.5 ||
| | radius | 24px ||
| | margin | 8 / 0.5 | `$spacing-03` |
| | padding-left, padding-right | 8 / 0.5 | `$spacing-03` |

<div className="image--fixed">

Expand Down

0 comments on commit a0c3249

Please sign in to comment.