Skip to content

Commit 4ed0b86

Browse files
committed
chore(community-tags): make borders respond to browser font size
Remove focus outline styles for Firefox
1 parent d0f190d commit 4ed0b86

File tree

3 files changed

+48
-21
lines changed

3 files changed

+48
-21
lines changed

packages/Tags/TagItem/TagItem.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const StyledTagButton = styled(Box)(
4444
alignItems: 'center',
4545
position: 'relative',
4646
border: `1px solid ${colorTelusPurple}`,
47-
borderRadius: '20px',
47+
borderRadius: '1.25rem',
4848
height: '2.5rem',
4949
'&:hover': {
5050
background: colors.hover,
@@ -58,7 +58,10 @@ const StyledTagButton = styled(Box)(
5858
bottom: '-2px',
5959
right: '-2px',
6060
border: `1px solid ${colors.border}`,
61-
borderRadius: '22px',
61+
borderRadius: '1.375rem',
62+
},
63+
'::-moz-focus-inner': {
64+
border: 0,
6265
},
6366
'&:focus': {
6467
outline: 'none',
@@ -72,7 +75,7 @@ const StyledTagButton = styled(Box)(
7275
right: isSelected ? '-10px' : '-11px',
7376
border: `${isSelected ? '2px' : '3px'} solid ${colors.outline}`,
7477
margin: '5px',
75-
borderRadius: '25px',
78+
borderRadius: '1.5625rem',
7679
},
7780
},
7881
'&:active': {

packages/Tags/TagItem/__tests__/__snapshots__/TagItem.spec.jsx.snap

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ exports[`TagItem renders 1`] = `
3838
align-items: center;
3939
position: relative;
4040
border: 1px solid #4b286d;
41-
border-radius: 20px;
41+
border-radius: 1.25rem;
4242
height: 2.5rem;
4343
}
4444
@@ -54,7 +54,11 @@ exports[`TagItem renders 1`] = `
5454
bottom: -2px;
5555
right: -2px;
5656
border: 1px solid #33204C;
57-
border-radius: 22px;
57+
border-radius: 1.375rem;
58+
}
59+
60+
.c0::-moz-focus-inner {
61+
border: 0;
5862
}
5963
6064
.c0:focus {
@@ -71,7 +75,7 @@ exports[`TagItem renders 1`] = `
7175
right: -11px;
7276
border: 3px solid #7557A0;
7377
margin: 5px;
74-
border-radius: 25px;
78+
border-radius: 1.5625rem;
7579
}
7680
7781
.c0:active {
@@ -352,7 +356,7 @@ exports[`TagItem renders with a pressed state when isLoading is true 1`] = `
352356
align-items: center;
353357
position: relative;
354358
border: 1px solid #4b286d;
355-
border-radius: 20px;
359+
border-radius: 1.25rem;
356360
height: 2.5rem;
357361
}
358362
@@ -368,7 +372,11 @@ exports[`TagItem renders with a pressed state when isLoading is true 1`] = `
368372
bottom: -2px;
369373
right: -2px;
370374
border: 1px solid #33204C;
371-
border-radius: 22px;
375+
border-radius: 1.375rem;
376+
}
377+
378+
.c0::-moz-focus-inner {
379+
border: 0;
372380
}
373381
374382
.c0:focus {
@@ -385,7 +393,7 @@ exports[`TagItem renders with a pressed state when isLoading is true 1`] = `
385393
right: -11px;
386394
border: 3px solid #7557A0;
387395
margin: 5px;
388-
border-radius: 25px;
396+
border-radius: 1.5625rem;
389397
}
390398
391399
.c0:active {

packages/Tags/__tests__/__snapshots__/Tags.spec.jsx.snap

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ exports[`Tags renders 1`] = `
6161
align-items: center;
6262
position: relative;
6363
border: 1px solid #4b286d;
64-
border-radius: 20px;
64+
border-radius: 1.25rem;
6565
height: 2.5rem;
6666
}
6767
@@ -77,7 +77,11 @@ exports[`Tags renders 1`] = `
7777
bottom: -2px;
7878
right: -2px;
7979
border: 1px solid #33204C;
80-
border-radius: 22px;
80+
border-radius: 1.375rem;
81+
}
82+
83+
.c3::-moz-focus-inner {
84+
border: 0;
8185
}
8286
8387
.c3:focus {
@@ -94,7 +98,7 @@ exports[`Tags renders 1`] = `
9498
right: -11px;
9599
border: 3px solid #7557A0;
96100
margin: 5px;
97-
border-radius: 25px;
101+
border-radius: 1.5625rem;
98102
}
99103
100104
.c3:active {
@@ -827,7 +831,7 @@ exports[`Tags renders isSelected 1`] = `
827831
align-items: center;
828832
position: relative;
829833
border: 1px solid #4b286d;
830-
border-radius: 20px;
834+
border-radius: 1.25rem;
831835
height: 2.5rem;
832836
}
833837
@@ -843,7 +847,11 @@ exports[`Tags renders isSelected 1`] = `
843847
bottom: -2px;
844848
right: -2px;
845849
border: 1px solid #33204C;
846-
border-radius: 22px;
850+
border-radius: 1.375rem;
851+
}
852+
853+
.c3::-moz-focus-inner {
854+
border: 0;
847855
}
848856
849857
.c3:focus {
@@ -860,7 +868,7 @@ exports[`Tags renders isSelected 1`] = `
860868
right: -11px;
861869
border: 3px solid #7557A0;
862870
margin: 5px;
863-
border-radius: 25px;
871+
border-radius: 1.5625rem;
864872
}
865873
866874
.c3:active {
@@ -886,7 +894,7 @@ exports[`Tags renders isSelected 1`] = `
886894
align-items: center;
887895
position: relative;
888896
border: 1px solid #4b286d;
889-
border-radius: 20px;
897+
border-radius: 1.25rem;
890898
height: 2.5rem;
891899
}
892900
@@ -903,7 +911,11 @@ exports[`Tags renders isSelected 1`] = `
903911
bottom: -2px;
904912
right: -2px;
905913
border: 1px solid #33204C;
906-
border-radius: 22px;
914+
border-radius: 1.375rem;
915+
}
916+
917+
.c7::-moz-focus-inner {
918+
border: 0;
907919
}
908920
909921
.c7:focus {
@@ -920,7 +932,7 @@ exports[`Tags renders isSelected 1`] = `
920932
right: -10px;
921933
border: 2px solid #7557A0;
922934
margin: 5px;
923-
border-radius: 25px;
935+
border-radius: 1.5625rem;
924936
}
925937
926938
.c7:active {
@@ -1646,7 +1658,7 @@ exports[`Tags renders when using the children prop 1`] = `
16461658
align-items: center;
16471659
position: relative;
16481660
border: 1px solid #4b286d;
1649-
border-radius: 20px;
1661+
border-radius: 1.25rem;
16501662
height: 2.5rem;
16511663
}
16521664
@@ -1662,7 +1674,11 @@ exports[`Tags renders when using the children prop 1`] = `
16621674
bottom: -2px;
16631675
right: -2px;
16641676
border: 1px solid #33204C;
1665-
border-radius: 22px;
1677+
border-radius: 1.375rem;
1678+
}
1679+
1680+
.c3::-moz-focus-inner {
1681+
border: 0;
16661682
}
16671683
16681684
.c3:focus {
@@ -1679,7 +1695,7 @@ exports[`Tags renders when using the children prop 1`] = `
16791695
right: -11px;
16801696
border: 3px solid #7557A0;
16811697
margin: 5px;
1682-
border-radius: 25px;
1698+
border-radius: 1.5625rem;
16831699
}
16841700
16851701
.c3:active {

0 commit comments

Comments
 (0)