Skip to content

Commit 8c457dd

Browse files
committed
- Fixes the font-weight issue (was due to non-existent CSS variables being referenced)
- Buttons in notifications have no border-radius
1 parent 31c9c9a commit 8c457dd

File tree

3 files changed

+49
-13
lines changed

3 files changed

+49
-13
lines changed

scss/bitstyles/design-tokens/_typography.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@use '../tools/custom-property';
22
@use 'sass:list';
3+
@use 'sass:map';
34

45
//
56
// Font-weights /////////////////////////////////////////
@@ -26,37 +27,37 @@ $webfont-variants: (
2627
'normal': (
2728
'font-family': $webfont-family-name,
2829
'font-style': normal,
29-
'font-weight': var(custom-property.name('font-weight', 'normal')),
30+
'font-weight': map.get($font-weights, 'normal'),
3031
'filename': 'poppins-v20-latin-400',
3132
),
3233
'italic': (
3334
'font-family': $webfont-family-name,
3435
'font-style': italic,
35-
'font-weight': var(custom-property.name('font-weight', 'normal')),
36+
'font-weight': map.get($font-weights, 'normal'),
3637
'filename': 'poppins-v20-latin-400italic',
3738
),
3839
'medium': (
3940
'font-family': $webfont-family-name,
4041
'font-style': normal,
41-
'font-weight': var(custom-property.name('font-weight', 'medium')),
42+
'font-weight': map.get($font-weights, 'medium'),
4243
'filename': 'poppins-v20-latin-500',
4344
),
4445
'medium-italic': (
4546
'font-family': $webfont-family-name,
4647
'font-style': italic,
47-
'font-weight': var(custom-property.name('font-weight', 'medium')),
48+
'font-weight': map.get($font-weights, 'medium'),
4849
'filename': 'poppins-v20-latin-500italic',
4950
),
5051
'semibold': (
5152
'font-family': $webfont-family-name,
5253
'font-style': normal,
53-
'font-weight': var(custom-property.name('font-weight', 'semibold')),
54+
'font-weight': map.get($font-weights, 'semibold'),
5455
'filename': 'poppins-v20-latin-600',
5556
),
5657
'semibold-italic': (
5758
'font-family': $webfont-family-name,
5859
'font-style': italic,
59-
'font-weight': var(custom-property.name('font-weight', 'semibold')),
60+
'font-weight': map.get($font-weights, 'semibold'),
6061
'filename': 'poppins-v20-latin-600italic',
6162
),
6263
) !default;

scss/bitstyles/molecules/notification/Notification.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import Button from '../../atoms/button/Button';
33

44
const CloseButton = () => {
55
return Button({
6-
colorVariant: ['transparent'],
6+
colorVariant: ['secondary'],
77
children: `<svg class="a-icon a-icon--xl" viewBox="0 0 100 100" width="18" height="18" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
88
<use xlink:href="${icons}#icon-cross"></use>
99
</svg><span class="u-sr-only">Remove notification</span>`,
10-
classname: ['u-self-start'],
10+
classname: ['m-notification__button'],
1111
});
1212
};
1313

scss/bitstyles/molecules/notification/_index.scss

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,63 @@
88
/* prettier-ignore */
99
$highlight-color-property: design-token.get('notification', 'highlight-color');
1010
$highlight-background-color-property: design-token.get('notification', 'highlight-background-color');
11+
$button-border-top-right-radius-property: design-token.get(
12+
'button',
13+
'border',
14+
'top',
15+
'right',
16+
'radius'
17+
);
18+
$button-border-bottom-right-radius-property: design-token.get(
19+
'button',
20+
'border',
21+
'bottom',
22+
'right',
23+
'radius'
24+
);
25+
$button-border-bottom-left-radius-property: design-token.get(
26+
'button',
27+
'border',
28+
'bottom',
29+
'left',
30+
'radius'
31+
);
32+
$button-border-top-left-radius-property: design-token.get(
33+
'button',
34+
'border',
35+
'top',
36+
'left',
37+
'radius'
38+
);
1139

1240
#{classname.get($classname-items: 'notification', $layer: 'molecule')} {
1341
display: flex;
1442
background-color: var(design-token.get("color", "grayscale", "white"));
1543
color: var(design-token.get("color", "grayscale", "dark-3"));
1644
}
1745

18-
#{classname.get($classname-items: 'notification__content', $layer: 'molecule')} {
19-
flex: 1;
20-
min-width: 0;
21-
padding: var(design-token.get("size", "l2")) 0 var(design-token.get("size", "l2")) var(design-token.get("size", "l2"));
46+
#{classname.get($classname-items: 'notification__button', $layer: 'molecule')} {
47+
#{$button-border-top-right-radius-property}: 0;
48+
#{$button-border-bottom-right-radius-property}: 0;
49+
#{$button-border-bottom-left-radius-property}: 0;
50+
#{$button-border-top-left-radius-property}: 0;
2251
}
2352

2453
#{classname.get($classname-items: 'notification__highlight', $layer: 'molecule')} {
2554
flex-shrink: 0;
2655
display: flex;
2756
align-items: center;
28-
padding: var(design-token.get("size", "s2"));
57+
padding: 0 var(design-token.get("size", "s1"));
2958
color: var($highlight-color-property, var(design-token.get("color", "brand-1", "dark-1")));
3059
background-color: var($highlight-background-color-property, var(design-token.get("color", "brand-1", "light-4")));
3160
}
3261

62+
#{classname.get($classname-items: 'notification__content', $layer: 'molecule')} {
63+
flex: 1;
64+
min-width: 0;
65+
padding: var(design-token.get("size", "l2")) 0 var(design-token.get("size", "l2")) var(design-token.get("size", "l2"));
66+
}
67+
3368
@each $theme-name, $theme in settings.$theme-variants {
3469
@include themes.get($theme-name) {
3570
#{$highlight-color-property}: map.get($theme, 'highlight-color');

0 commit comments

Comments
 (0)