Skip to content

Commit

Permalink
BREAKING CHANGE(web): Remove default (now neutral) and light (`…
Browse files Browse the repository at this point in the history
…subtle`) `Tag` variants #DS-648

## Migration Guide

Instead of the `default` color, use `neutral` in the `Tag` component.

Instead of the `light` variant, use `subtle` in the `Tag` component.

- `<span class="Tag Tag--default" …>` → `<span class="Tag Tag--neutral" …>`
- `<span class="Tag Tag--light" …>` → `<span class="Tag Tag--subtle" …>`

Please refer back to this guide or reach out to our team
if you encounter any issues during migration.
  • Loading branch information
crishpeen authored and literat committed Jul 21, 2023
1 parent f982ce9 commit 273aa26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/web/src/scss/components/Tag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Subtle variants:
<span class="Tag Tag--danger Tag--subtle Tag--small">Danger subtle tag</span>
```

Dark variants:
Default (non-subtle) variants:

```html
<span class="Tag Tag--neutral Tag--small">neutral dark tag</span>
Expand Down
14 changes: 1 addition & 13 deletions packages/web/src/scss/components/Tag/_Tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@
'tag-subtle'
);

// @deprecated Will be removed in the next major version.
@include dictionaries.generate-colors(
'Tag--light.Tag',
theme.$color-dictionary,
theme.$subtle-color-dictionary-config,
null,
theme.$subtle-color-dictionary-overrides,
'tag-light'
);

.Tag--subtle.Tag--xsmall,
// @deprecated Will be removed in the next major version.
.Tag--light.Tag--xsmall {
.Tag--subtle.Tag--xsmall {
background-color: transparent;
}
22 changes: 3 additions & 19 deletions packages/web/src/scss/components/Tag/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,19 @@
@use '@tokens' as tokens;
@use '../../settings/dictionaries';

/** @deprecated Will be removed in the next major version. */
$_tag-colors-deprecated: default;

$_tag-colors: neutral;

$color-dictionary: list.join(dictionaries.$emotion-colors, list.join($_tag-colors-deprecated, $_tag-colors));
$color-dictionary: list.join(dictionaries.$emotion-colors, $_tag-colors);

$color-dictionary-config: (
color: tokens.$text-primary-inverted-default,
background-color: 'default',
);

$color-dictionary-overrides: (
// @deprecated Will be removed in the next major version
default:
(
background-color: tokens.$background-inverted,
),

neutral: (
background-color: tokens.$background-inverted,
)
),
);

$subtle-color-dictionary-config: (
Expand All @@ -32,17 +23,10 @@ $subtle-color-dictionary-config: (
);

$subtle-color-dictionary-overrides: (
// @deprecated Will be removed in the next major version
default:
(
color: tokens.$text-primary-default,
background-color: tokens.$background-cover,
),

neutral: (
color: tokens.$text-primary-default,
background-color: tokens.$background-cover,
)
),
);

$border-radius: tokens.$radius-100;
Expand Down

0 comments on commit 273aa26

Please sign in to comment.