Skip to content

Commit 82144ce

Browse files
authored
add new border radius tokens (#2717)
* add new border radius tokens * add border radius css variables * use border radius css variables * prevent border radius unused variables error
1 parent 983ca5c commit 82144ce

File tree

30 files changed

+212
-53
lines changed

30 files changed

+212
-53
lines changed

src/components/accordion/_accordion.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
transition: $durationQuick2 $easingLinear border-color;
55

66
&--no-gap {
7-
border-radius: 0;
7+
border-radius: var(--border-radius-none);
88
border-top: none;
99

1010
&:first-child {
1111
border-top: 2px solid $gray-20;
12-
border-top-left-radius: $borderRadiusDefault;
13-
border-top-right-radius: $borderRadiusDefault;
12+
border-top-left-radius: var(--border-radius-xs);
13+
border-top-right-radius: var(--border-radius-xs);
1414
}
1515

1616
&:last-child {
17-
border-bottom-left-radius: $borderRadiusDefault;
18-
border-bottom-right-radius: $borderRadiusDefault;
17+
border-bottom-left-radius: var(--border-radius-xs);
18+
border-bottom-right-radius: var(--border-radius-xs);
1919
}
2020
}
2121

@@ -66,7 +66,7 @@
6666
width: 40px;
6767
height: 40px;
6868
content: '';
69-
border-radius: 50%;
69+
border-radius: var(--border-radius-pill);
7070
transition: $durationQuick2 $easingLinear background-color,
7171
$durationQuick2 $easingRegular transform;
7272
}

src/components/avatar/_avatar.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $includeHtml: false !default;
1919

2020
width: $avatarSmallSize;
2121
height: $avatarSmallSize;
22-
border-radius: 50%;
22+
border-radius: var(--border-radius-pill);
2323
// workaround for the Chrome bug - crbug.com/157218
2424
-webkit-perspective: 1px;
2525

@@ -42,7 +42,7 @@ $includeHtml: false !default;
4242
&__wrapper-link {
4343
@include applyFocus();
4444

45-
border-radius: 50%;
45+
border-radius: var(--border-radius-pill);
4646
display: block;
4747
width: min-content;
4848
}

src/components/box/_box.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ $includeHtml: false !default;
100100
}
101101

102102
@include makeResponsive($variant, 'sg-box--no-border-radius') {
103-
border-radius: 0;
103+
border-radius: var(--border-radius-none);
104104
}
105105

106106
@include makeResponsive($variant, 'sg-box--border-radius') {
107-
border-radius: $borderRadiusDefault;
107+
border-radius: var(--border-radius-xs);
108108
}
109109

110110
@include makeResponsive($variant, 'sg-box--border') {

src/components/bubble/_bubble.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $includeHtml: false !default;
2424
.sg-bubble {
2525
background: $bubbleBackground;
2626
border-color: $bubbleBackground;
27-
border-radius: $borderRadiusDefault;
27+
border-radius: var(--border-radius-xs);
2828
box-shadow: $shadowMedium;
2929
padding: gutter(0.5) gutter(1);
3030
position: relative;

src/components/buttons/UnstyledButton.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import UnstyledButtonA11y from './stories/UnstyledButton.a11y.mdx';
5353
padding: 0 8px;
5454
background-color: var(--yellow-40);
5555
transform: translate3d(0, 50%, 0);
56-
border-radius: 8px;
56+
border-radius: var(--border-radius-xs);
5757
color: var(--white);
5858
font-weight: bold;
5959
`;

src/components/buttons/_buttons.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ $largeButtonSize: componentSize(l);
110110
}
111111

112112
&--s {
113-
border-radius: 16px;
113+
border-radius: var(--border-radius-m);
114114
height: $smallButtonSize;
115115
padding: 0 spacing(s);
116116
font-size: 12px;
117117
line-height: 12px;
118118

119119
.sg-button__hover-overlay {
120-
border-radius: 16px;
120+
border-radius: var(--border-radius-m);
121121
}
122122

123123
// Proxima is broken

src/components/buttons/_buttons_solid_round.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $includeHtml: false !default;
4242
justify-content: center;
4343
width: $buttonRoundAddSize;
4444
height: $buttonRoundAddSize;
45-
border-radius: 50%;
45+
border-radius: var(--border-radius-pill);
4646
line-height: $buttonRoundAddSize;
4747
text-align: center;
4848
background-color: $buttonRoundColor;

src/components/card/_card.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $includeHtml: false !default;
1111
display: inline-flex;
1212
align-items: flex-start;
1313
flex-wrap: wrap;
14-
border-radius: $borderRadiusDefault;
14+
border-radius: var(--border-radius-xs);
1515
border: $cardBorderColor solid $cardBorderSize;
1616
overflow: hidden;
1717
background-color: $white;

src/components/chip/_chip.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
display: inline-flex;
66
position: relative;
77
background: var(--white);
8-
border-radius: 8px;
8+
border-radius: var(--border-radius-xs);
99
// transform: scale(10) translate(20px, 20px);
1010

1111
&__input {
@@ -92,7 +92,7 @@
9292
border: 2px solid var(--chipBorderColor);
9393
display: flex;
9494
align-items: center;
95-
border-radius: 8px;
95+
border-radius: var(--border-radius-xs);
9696
transition: box-shadow $durationQuick1 $easingExit,
9797
border-color $durationModerate1 $easingLinear,
9898
transform $durationModerate2 $easingRegular,

src/components/counters/_counters.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $counterSizeXS: componentSize(xs);
55

66
@if ($includeHtml) {
77
.sg-counter {
8-
border-radius: $borderRadiusLarge;
8+
border-radius: var(--border-radius-s);
99
padding: 0 spacing(xs);
1010
min-width: $counterSizeXS;
1111
min-height: $counterSizeXS;
@@ -132,7 +132,7 @@ $counterSizeXS: componentSize(xs);
132132
&::before {
133133
height: 12px;
134134
width: 12px;
135-
border-radius: 6px;
135+
border-radius: var(--border-radius-xxs);
136136
}
137137
}
138138
}

0 commit comments

Comments
 (0)