Skip to content

Commit eecb823

Browse files
committed
create more whitespace in small tags
1 parent 4c46c68 commit eecb823

2 files changed

Lines changed: 19 additions & 12 deletions

File tree

src/components/OverviewItem/stories/OverviewItem.stories.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
Badge,
77
Card,
88
Depiction,
9+
OverflowText,
910
OverviewItem,
1011
OverviewItemActions,
1112
OverviewItemDepiction,
@@ -87,12 +88,14 @@ ItemWithTags.args = {
8788
<OverviewItemDepiction {...DepictionExample.args} key={"depiction"} />,
8889
<OverviewItemDescription key={"description"}>
8990
<OverviewItemLine {...LineExample.args} />
90-
<OverviewItemLine>
91-
<TagList>
92-
<Tag small>Test</Tag>
93-
<Tag small>Tag</Tag>
94-
<Tag small>List</Tag>
95-
</TagList>
91+
<OverviewItemLine small>
92+
<OverflowText>
93+
<TagList>
94+
<Tag small>Test</Tag>
95+
<Tag small>Tag</Tag>
96+
<Tag small>List</Tag>
97+
</TagList>
98+
</OverflowText>
9699
</OverviewItemLine>
97100
</OverviewItemDescription>,
98101
<OverviewItemActions children={ActionsExample.args.children[0]} key={"actions"} />,

src/components/Tag/tag.scss

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@ $tag-round-adjustment: 0 !default;
3030
@import "~@blueprintjs/core/src/components/tag/tag";
3131

3232
.#{$eccgui}-tag__item {
33+
--eccgui-tag-border-width: 1px;
34+
3335
flex-grow: 0;
3436
flex-shrink: 0;
3537
min-width: calc(#{$tag-height} - 2px);
3638
min-height: calc(#{$tag-height} - 2px);
3739
max-height: calc(#{$tag-height} - 2px);
3840
padding: 0 $tag-padding-top;
41+
line-height: calc(#{$tag-height} - 2px);
3942

4043
&.#{$ns}-round {
4144
border-radius: $tag-height * 0.5;
@@ -55,11 +58,12 @@ $tag-round-adjustment: 0 !default;
5558
}
5659

5760
&.#{$eccgui}-tag--small {
58-
min-width: calc(#{$tag-height-small} + #{$tag-padding-small} - 2px);
59-
min-height: calc(#{$tag-height-small} + #{$tag-padding-small} - 2px);
60-
max-height: calc(#{$tag-height-small} + #{$tag-padding-small} - 2px);
61+
min-width: calc(#{$tag-height-small} + #{$tag-padding-small});
62+
min-height: calc(#{$tag-height-small} + #{$tag-padding-small});
63+
max-height: calc(#{$tag-height-small} + #{$tag-padding-small});
6164
padding: 0 $tag-padding-small;
62-
line-height: calc(#{$tag-height-small} - 2px);
65+
font-size: calc(#{$eccgui-size-typo-tag} - 1px);
66+
line-height: calc(#{$tag-height-small} + #{$tag-padding-small});
6367

6468
&.#{$ns}-round {
6569
border-radius: $tag-height-small * 0.5;
@@ -75,7 +79,7 @@ $tag-round-adjustment: 0 !default;
7579
min-height: calc(#{$tag-height-large} + #{$tag-padding-large} - 2px);
7680
max-height: calc(#{$tag-height-large} + #{$tag-padding-large} - 2px);
7781
font-size: $eccgui-size-typo-tag-large;
78-
line-height: calc(#{$tag-height-large} - 2px);
82+
line-height: calc(#{$tag-height-large} + #{$tag-padding-large} - 2px);
7983

8084
&.#{$ns}-round {
8185
border-radius: $tag-height-large * 0.5;
@@ -138,7 +142,7 @@ $tag-round-adjustment: 0 !default;
138142

139143
.#{$ns}-tag {
140144
border-style: solid;
141-
border-width: 1px;
145+
border-width: var(--eccgui-tag-border-width);
142146

143147
&:not([class*="#{$ns}-intent-"]) {
144148
--eccgui-tag-bg: #{$tag-default-color};

0 commit comments

Comments
 (0)