Skip to content

Commit

Permalink
fix(chips & tags): missing default:light variant (#691)
Browse files Browse the repository at this point in the history
* feat: added default:light variant

* refactor: chips and tags are supposed to get a font-weight of 500 instead of the default 400
  • Loading branch information
mfranzke authored Jan 4, 2024
1 parent 3994704 commit e08e111
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
7 changes: 7 additions & 0 deletions source/_patterns/01-elements/chips/chip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
border: solid 1px $db-color-cool-gray-400;
border-radius: $chip---radius;
display: inline-flex;
font-weight: 500;

// Link related styles
font-size: to-rem($pxValue: 14);
Expand Down Expand Up @@ -42,6 +43,12 @@
color: $chip-checked--color;

//*** Variants ***
&[data-variant="light"] {
background-color: $db-color-cool-gray-200;
color: $db-color-cool-gray-700;
border: 1px solid $db-color-cool-gray-400;
}

&[data-variant="warning"] {
background-color: $db-color-warning;
}
Expand Down
4 changes: 4 additions & 0 deletions source/_patterns/01-elements/chips/chips.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"variants": [
{
"label": "Light",
"variant": "light"
},
{
"label": "Warning",
"variant": "warning"
Expand Down
8 changes: 7 additions & 1 deletion source/_patterns/01-elements/tags/tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
border-radius: $tag---radius;
color: $tag---color;
display: inline-flex;
font-weight: 500;

// Link related styles
font-size: to-rem($pxValue: 12);
font-weight: initial;
height: to-rem($pxValue: 24);
justify-content: center;
padding-left: to-rem($pxValue: 4);
Expand All @@ -27,6 +27,12 @@
}

//*** Variants ***
&[data-variant="light"] {
background-color: $db-color-cool-gray-200;
color: $db-color-cool-gray-700;
border: 1px solid $db-color-cool-gray-400;
}

&[data-variant="warning"] {
background-color: $db-color-warning-small-font;
}
Expand Down
4 changes: 4 additions & 0 deletions source/_patterns/01-elements/tags/tags.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"variants": [
{
"label": "Light",
"variant": "light"
},
{
"label": "Informative",
"variant": "informative"
Expand Down

0 comments on commit e08e111

Please sign in to comment.