/
_c.notification.scss
127 lines (106 loc) · 2.42 KB
/
_c.notification.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/* mqp:start */
.mc-notification {
$parent: get-parent-selector(&);
@include set-font-face();
@include set-border-radius();
@include set-flexy();
@include set-notification-size($notification-default-size);
@include set-notification-type('information');
box-sizing: border-box;
color: $color-font-darkest;
&::before {
background-color: transparent;
background-repeat: no-repeat;
content: '';
display: block;
}
&__content {
flex: 1 1 0;
}
&__title,
&__message {
margin-bottom: 0;
margin-top: 0;
}
&__title {
@include set-font-face('semi-bold');
@include set-font-scale('05');
}
&__message {
@include set-font-scale('04');
}
&__footer {
align-items: flex-start;
display: flex;
flex-direction: column;
margin-top: $mu100;
@include set-from-screen('l') {
flex-direction: row;
}
}
// TODO: to be removed later
&__link {
@include set-font-scale('04', 'm');
margin-top: $mu050;
}
.mc-button {
&:not(:first-child) {
margin-top: $mu100;
@include set-from-screen('l') {
margin: {
top: 0;
left: $mu100;
}
}
}
}
// Notification type
@each $type, $props in $notification-types {
&--#{$type} {
@include set-notification-type($type);
}
}
// Notification size
@each $size, $props in $notification-sizes {
&--#{$size} {
@if ($size != 'm') {
@include set-notification-size($props);
@each $type, $props in $notification-types {
@if ($type != 'information') {
&#{$parent}--#{$type} {
@include set-notification-type($type, $size);
}
} @else {
@include set-notification-type('information', $size);
}
}
}
}
}
// Closable
&-closable {
position: relative;
&__close {
@include set-focus-floating-base;
background: transparent
url(inline-icons('cross-16', $notification-close-icon-color)) no-repeat;
background-size: $mu100;
border: 0;
cursor: pointer;
display: block;
height: $mu100;
padding: 0;
position: absolute;
outline: 0;
right: $mu100;
top: $mu100;
width: $mu100;
&:focus {
@include set-focus-floating {
box-shadow: 0 0 0 $size-focus-border-thin $color-focus-border;
}
}
}
}
}
/* mqp:end */