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

Docs: v11 color token updates for Content switcher component #2319

Merged
merged 4 commits into from
May 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions src/pages/components/content-switcher/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,27 @@ Content switchers have two main states: `selected` and `unselected`. By default,
content switcher buttons are unselected with the selected state using a high
contrast color.

| Class | Property | Color token |
| --------------------------- | ---------------- | ------------- |
| `.bx--content-switcher-btn` | background-color | `$ui-01` |
| `.bx--content-switcher-btn` | text color | `$text-02` |
| `--selected` | background-color | `$ui-05` |
| `--selected` | text color | `$inverse-01` |
| `:after` | divider | `$ui-03` |
| Class | Property | Color token |
| --------------------------- | ---------------- | ------------------------- |
| `.bx--content-switcher-btn` | background-color | `transparent` |
| `.bx--content-switcher-btn` | text color | `$text-secondary` |
| `.bx--content-switcher-btn` | border | `$border-inverse` |
| `--selected` | background-color | `$layer-selected-inverse` |
| `--selected` | text color | `$text-inverse` |
| `:after` | divider | `$border-subtle` |

### Interactive states

Hover states only apply to `unselected` buttons.

| State | Property | Color token |
| ----------- | ---------------- | -------------- |
| `:hover` | background-color | `$hover-ui` |
| `:hover` | text color | `$text-01` |
| `:focus` | border | `$focus` |
| `:disabled` | background-color | `$disabled-01` |
| `:disabled` | text color | `$disabled-02` |
| State | Property | Color token |
| ----------- | ---------------- | ------------------- |
| `:hover` | background-color | `$background-hover` |
| `:hover` | text color | `$text-primary` |
| `:focus` | border | `$focus` |
| `:disabled` | background-color | `transparent` |
| `:disabled` | text color | `$text-disabled` |
| `:disabled` | border | `$border-disabled` |

<Row>
<Column colLg={8}>
Expand Down