pallote-css 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +88 -0
- package/_site/LICENSE +21 -0
- package/_site/README.md +88 -0
- package/_site/package.json +28 -0
- package/assets/_sass/.DS_Store +0 -0
- package/assets/_sass/common/_editor.scss +166 -0
- package/assets/_sass/common/_fontface.scss +28 -0
- package/assets/_sass/common/_global.scss +132 -0
- package/assets/_sass/common/_mixins.scss +156 -0
- package/assets/_sass/common/_reset.scss +81 -0
- package/assets/_sass/common/_variables.scss +213 -0
- package/assets/_sass/components/_alert.scss +189 -0
- package/assets/_sass/components/_button.scss +257 -0
- package/assets/_sass/components/_buttons.scss +63 -0
- package/assets/_sass/components/_card.scss +252 -0
- package/assets/_sass/components/_form.scss +68 -0
- package/assets/_sass/components/_grid.scss +163 -0
- package/assets/_sass/components/_input.scss +268 -0
- package/assets/_sass/components/_link.scss +49 -0
- package/assets/_sass/components/_list.scss +40 -0
- package/assets/_sass/components/_nav.scss +72 -0
- package/assets/_sass/components/_navbar.scss +207 -0
- package/assets/_sass/components/_page.scss +33 -0
- package/assets/_sass/components/_section.scss +158 -0
- package/assets/_sass/components/_sidebar.scss +27 -0
- package/assets/_sass/components/_tag.scss +78 -0
- package/assets/_sass/components/_text.scss +89 -0
- package/assets/_sass/modules/_cookie.scss +32 -0
- package/assets/_sass/plugins/_highlighter-theme.scss +68 -0
- package/assets/_sass/utilities/_color.scss +122 -0
- package/assets/_sass/utilities/_global.scss +121 -0
- package/assets/_sass/utilities/_text.scss +63 -0
- package/package.json +28 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
// —————————————————————————————————————————————————————————————————
|
|
2
|
+
// media queries
|
|
3
|
+
// font
|
|
4
|
+
// form
|
|
5
|
+
// misc
|
|
6
|
+
// —————————————————————————————————————————————————————————————————
|
|
7
|
+
|
|
8
|
+
// —————————————————————————————————————————————————————————————————
|
|
9
|
+
// media queries
|
|
10
|
+
// —————————————————————————————————————————————————————————————————
|
|
11
|
+
|
|
12
|
+
@mixin responsive($value, $breakpoint) {
|
|
13
|
+
@if $value == up {
|
|
14
|
+
$value: min-width;
|
|
15
|
+
@if $breakpoint == desktop-lg { $breakpoint: $desktop-lg; }
|
|
16
|
+
@else if $breakpoint == desktop { $breakpoint: $desktop; }
|
|
17
|
+
@else if $breakpoint == laptop { $breakpoint: $laptop; }
|
|
18
|
+
@else if $breakpoint == tablet { $breakpoint: $tablet; }
|
|
19
|
+
@else if $breakpoint == mobile { $breakpoint: $mobile; }
|
|
20
|
+
@else if $breakpoint == mobile-sm { $breakpoint: $mobile-sm; }
|
|
21
|
+
|
|
22
|
+
} @else if $value == down {
|
|
23
|
+
$value: max-width;
|
|
24
|
+
@if $breakpoint == desktop-lg { $breakpoint: $desktop-lg-down; }
|
|
25
|
+
@else if $breakpoint == desktop { $breakpoint: $desktop-down; }
|
|
26
|
+
@else if $breakpoint == laptop { $breakpoint: $laptop-down; }
|
|
27
|
+
@else if $breakpoint == tablet { $breakpoint: $tablet-down; }
|
|
28
|
+
@else if $breakpoint == mobile { $breakpoint: $mobile-down; }
|
|
29
|
+
@else if $breakpoint == mobile-sm { $breakpoint: $mobile-sm-down; }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media ($value: $breakpoint) {
|
|
33
|
+
@content;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin responsive-touch {
|
|
38
|
+
@media (pointer:coarse) {
|
|
39
|
+
@content;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@mixin responsive-touch-landscape {
|
|
44
|
+
@media only screen and (max-device-width: $laptop-down) and (orientation: landscape) {
|
|
45
|
+
@content;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// —————————————————————————————————————————————————————————————————
|
|
50
|
+
// font
|
|
51
|
+
// —————————————————————————————————————————————————————————————————
|
|
52
|
+
|
|
53
|
+
@mixin fontface($font-name, $font-file, $font-weight, $font-style) {
|
|
54
|
+
|
|
55
|
+
@font-face {
|
|
56
|
+
font-family: $font-name;
|
|
57
|
+
src: url('../fonts/' + $font-file + '.woff2') format('woff2');
|
|
58
|
+
font-weight: $font-weight;
|
|
59
|
+
font-style: $font-style;
|
|
60
|
+
font-display: swap;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@mixin text-ellipsis() {
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
text-overflow: ellipsis;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// —————————————————————————————————————————————————————————————————
|
|
71
|
+
// form
|
|
72
|
+
// —————————————————————————————————————————————————————————————————
|
|
73
|
+
|
|
74
|
+
@mixin placeholder {
|
|
75
|
+
:-moz-placeholder { @content; }
|
|
76
|
+
::-moz-placeholder { @content; }
|
|
77
|
+
:-ms-input-placeholder { @content; }
|
|
78
|
+
::-webkit-input-placeholder { @content; }
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// —————————————————————————————————————————————————————————————————
|
|
82
|
+
// misc
|
|
83
|
+
// —————————————————————————————————————————————————————————————————
|
|
84
|
+
|
|
85
|
+
@mixin calc($property, $expression) {
|
|
86
|
+
#{$property}: -webkit-calc(#{$expression});
|
|
87
|
+
#{$property}: calc(#{$expression});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@mixin background($position, $size) {
|
|
91
|
+
background-position: $position;
|
|
92
|
+
-webkit-background-size: $size;
|
|
93
|
+
background-size: $size;
|
|
94
|
+
background-repeat: no-repeat;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@mixin pseudo-element($content: "", $top: 0, $right: 0, $bottom: 0, $left: 0, $width: 100%, $height: 100%) {
|
|
98
|
+
content: $content;
|
|
99
|
+
position: absolute;
|
|
100
|
+
top: $top;
|
|
101
|
+
right: $right;
|
|
102
|
+
bottom: $bottom;
|
|
103
|
+
left: $left;
|
|
104
|
+
width: $width;
|
|
105
|
+
height: $height;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@mixin hover {
|
|
109
|
+
&:hover, &:active, &:focus {
|
|
110
|
+
@content;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@mixin keyframes($name) {
|
|
115
|
+
@-webkit-keyframes #{$name} {
|
|
116
|
+
@content;
|
|
117
|
+
}
|
|
118
|
+
@-moz-keyframes #{$name} {
|
|
119
|
+
@content;
|
|
120
|
+
}
|
|
121
|
+
@-ms-keyframes #{$name} {
|
|
122
|
+
@content;
|
|
123
|
+
}
|
|
124
|
+
@keyframes #{$name} {
|
|
125
|
+
@content;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@mixin transition($time, $properties...) {
|
|
130
|
+
$transition: ();
|
|
131
|
+
$will-change: ();
|
|
132
|
+
@each $property in $properties {
|
|
133
|
+
$transition: append(
|
|
134
|
+
$transition, ($property $time), $separator: comma
|
|
135
|
+
);
|
|
136
|
+
$will-change: append(
|
|
137
|
+
$will-change, ($property), $separator: comma
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
transition: $transition;
|
|
141
|
+
will-change: $will-change;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// fallback for clamp css function
|
|
145
|
+
@mixin clamp($property, $min-size, $scaler, $max-size, $viewport: tablet){
|
|
146
|
+
|
|
147
|
+
@include responsive(up, $viewport) {
|
|
148
|
+
#{$property}: $max-size;
|
|
149
|
+
#{$property}: clamp($min-size, $scaler, $max-size);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@include responsive(down, $viewport) {
|
|
153
|
+
#{$property}: $min-size;
|
|
154
|
+
#{$property}: clamp($min-size, $scaler, $max-size);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// —————————————————————————————————————————————————————————————————
|
|
2
|
+
// custom (for IE)
|
|
3
|
+
// The new CSS Reset - version 1.2.0 (last updated 23.7.2021)
|
|
4
|
+
// —————————————————————————————————————————————————————————————————
|
|
5
|
+
|
|
6
|
+
// —————————————————————————————————————————————————————————————————
|
|
7
|
+
// custom (for IE)
|
|
8
|
+
// —————————————————————————————————————————————————————————————————
|
|
9
|
+
|
|
10
|
+
body,
|
|
11
|
+
html {
|
|
12
|
+
margin: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
h1, h2, h3, h4, h5, h6, p {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// remove visited link styling
|
|
20
|
+
button, a {
|
|
21
|
+
color: inherit;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// remove space under picture tag
|
|
25
|
+
picture {
|
|
26
|
+
display: flex;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// —————————————————————————————————————————————————————————————————
|
|
30
|
+
// The new CSS Reset - version 1.2.0 (last updated 23.7.2021)
|
|
31
|
+
// —————————————————————————————————————————————————————————————————
|
|
32
|
+
|
|
33
|
+
// Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property
|
|
34
|
+
*:where(:not(iframe, canvas, img, svg, video, pre):not(svg *)) {
|
|
35
|
+
all: unset;
|
|
36
|
+
display: revert;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Preferred box-sizing value
|
|
40
|
+
*,
|
|
41
|
+
*::before,
|
|
42
|
+
*::after {
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Remove list styles (bullets/numbers) in case you use it with normalize.css
|
|
47
|
+
ol, ul {
|
|
48
|
+
list-style: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// For images to not be able to exceed their container
|
|
52
|
+
img {
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Removes spacing between cells in tables
|
|
57
|
+
table {
|
|
58
|
+
border-collapse: collapse;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Revert the 'white-space' property for textarea elements on Safari
|
|
62
|
+
textarea {
|
|
63
|
+
white-space: revert;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Add focus styles
|
|
67
|
+
a[href],
|
|
68
|
+
area[href],
|
|
69
|
+
input,
|
|
70
|
+
select,
|
|
71
|
+
textarea,
|
|
72
|
+
button,
|
|
73
|
+
iframe,
|
|
74
|
+
[tabindex],
|
|
75
|
+
[contentEditable=true] {
|
|
76
|
+
|
|
77
|
+
&:focus {
|
|
78
|
+
outline: revert;
|
|
79
|
+
outline-color: $primary;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// —————————————————————————————————————————————————————————————————
|
|
2
|
+
// color palette
|
|
3
|
+
// spacing
|
|
4
|
+
// typography
|
|
5
|
+
// breakpoints
|
|
6
|
+
// misc
|
|
7
|
+
// —————————————————————————————————————————————————————————————————
|
|
8
|
+
|
|
9
|
+
// —————————————————————————————————————————————————————————————————
|
|
10
|
+
// color palette
|
|
11
|
+
// —————————————————————————————————————————————————————————————————
|
|
12
|
+
|
|
13
|
+
// main
|
|
14
|
+
|
|
15
|
+
$white: #ffffff !default;
|
|
16
|
+
$black: #000a1e !default;
|
|
17
|
+
|
|
18
|
+
// grey
|
|
19
|
+
|
|
20
|
+
$grey-90: #1A2335 !default;
|
|
21
|
+
$grey-80: #333B4B !default;
|
|
22
|
+
$grey-70: #4D5462 !default;
|
|
23
|
+
$grey-60: #666C78 !default;
|
|
24
|
+
$grey-50: #7F848E !default;
|
|
25
|
+
$grey-40: #999DA5 !default;
|
|
26
|
+
$grey-30: #B2B5BB !default;
|
|
27
|
+
$grey-20: #CCCED2 !default;
|
|
28
|
+
$grey-10: #E5E6E8 !default;
|
|
29
|
+
$grey-5: #F2F3F4 !default;
|
|
30
|
+
|
|
31
|
+
// text
|
|
32
|
+
|
|
33
|
+
$text: $white !default;
|
|
34
|
+
$text-alt: rgba($text, 0.5) !default;
|
|
35
|
+
$text-disabled: rgba($text, 0.25) !default;
|
|
36
|
+
|
|
37
|
+
$text-contrast: $black !default;
|
|
38
|
+
$text-contrast-alt: rgba($text-contrast, 0.6) !default;
|
|
39
|
+
$text-contrast-disabled: rgba($text-contrast, 0.3) !default;
|
|
40
|
+
|
|
41
|
+
// brand
|
|
42
|
+
|
|
43
|
+
$primary-light: #C2F9FF !default;
|
|
44
|
+
$primary: #00D2FC !default;
|
|
45
|
+
$primary-dark: #009BC3 !default;
|
|
46
|
+
$primary-text: $text-contrast !default;
|
|
47
|
+
|
|
48
|
+
$secondary-light: #B1B9D4 !default;
|
|
49
|
+
$secondary: #4D5C8D !default;
|
|
50
|
+
$secondary-dark: #3D4971 !default;
|
|
51
|
+
$secondary-text: $text !default;
|
|
52
|
+
|
|
53
|
+
$highlight-light: #F9D7B8 !default;
|
|
54
|
+
$highlight: #F2994A !default;
|
|
55
|
+
$highlight-dark: #EF7910 !default;
|
|
56
|
+
$highlight-text: $text-contrast !default;
|
|
57
|
+
|
|
58
|
+
// feedback
|
|
59
|
+
|
|
60
|
+
$success-light: #E7F9EE !default;
|
|
61
|
+
$success: #27AE60 !default;
|
|
62
|
+
$success-dark: #1C7C44 !default;
|
|
63
|
+
$success-text: #155F34 !default;
|
|
64
|
+
$success-contrast: $text !default;
|
|
65
|
+
|
|
66
|
+
$info-light: #E9F8FD !default;
|
|
67
|
+
$info: #17A0CC !default;
|
|
68
|
+
$info-dark: #117798 !default;
|
|
69
|
+
$info-text: #0D5A72 !default;
|
|
70
|
+
$info-contrast: $text !default;
|
|
71
|
+
|
|
72
|
+
$warning-light: #FFFAE5 !default;
|
|
73
|
+
$warning: #FFDC46 !default;
|
|
74
|
+
$warning-dark: #E5BA00 !default;
|
|
75
|
+
$warning-text: #685400 !default;
|
|
76
|
+
$warning-contrast: $text-contrast !default;
|
|
77
|
+
|
|
78
|
+
$error-light: #FCE7E7 !default;
|
|
79
|
+
$error: #EB5757 !default;
|
|
80
|
+
$error-dark: #D31919 !default;
|
|
81
|
+
$error-text: #9C1212 !default;
|
|
82
|
+
$error-contrast: $text !default;
|
|
83
|
+
|
|
84
|
+
// background
|
|
85
|
+
|
|
86
|
+
$background-default: $black !default;
|
|
87
|
+
$background-paper: $grey-90 !default;
|
|
88
|
+
|
|
89
|
+
// others
|
|
90
|
+
|
|
91
|
+
$border-color: rgba($text, 0.2) !default;
|
|
92
|
+
$border: 1px solid $border-color !default;
|
|
93
|
+
|
|
94
|
+
$hover: rgba($text, 0.12) !default;
|
|
95
|
+
|
|
96
|
+
$backdrop: rgba($text-contrast, 0.8) !default;
|
|
97
|
+
$backdrop-contrast: rgba($text, 0.2) !default;
|
|
98
|
+
|
|
99
|
+
// —————————————————————————————————————————————————————————————————
|
|
100
|
+
// spacing
|
|
101
|
+
// —————————————————————————————————————————————————————————————————
|
|
102
|
+
|
|
103
|
+
$col: calc(100%/12);
|
|
104
|
+
|
|
105
|
+
$spacing-xxs: 0.125rem !default;
|
|
106
|
+
$spacing-xs: 0.25rem !default;
|
|
107
|
+
$spacing-sm: 0.5rem !default;
|
|
108
|
+
$spacing-md: 1rem !default;
|
|
109
|
+
$spacing-lg: 2rem !default;
|
|
110
|
+
$spacing-xl: 4rem !default;
|
|
111
|
+
$spacing-xxl: 7rem !default;
|
|
112
|
+
|
|
113
|
+
$max-width-subtitle: $spacing-xxl*4 !default;
|
|
114
|
+
$max-width-editor: $spacing-xxl*6 !default;
|
|
115
|
+
|
|
116
|
+
$navbar-height: 4rem !default;
|
|
117
|
+
|
|
118
|
+
// —————————————————————————————————————————————————————————————————
|
|
119
|
+
// typography
|
|
120
|
+
// —————————————————————————————————————————————————————————————————
|
|
121
|
+
|
|
122
|
+
// typefaces
|
|
123
|
+
|
|
124
|
+
$font: "Barlow", Arial, sans-serif !default;
|
|
125
|
+
|
|
126
|
+
// weight
|
|
127
|
+
|
|
128
|
+
$font-regular: 400 !default;
|
|
129
|
+
$font-bold: 700 !default;
|
|
130
|
+
$font-black: 900 !default;
|
|
131
|
+
|
|
132
|
+
// styles
|
|
133
|
+
|
|
134
|
+
$h1-size: 3rem !default;
|
|
135
|
+
$h1-weight: $font-black !default;
|
|
136
|
+
$h1-line-height: 1.25 !default;
|
|
137
|
+
|
|
138
|
+
$h2-size: 2.5rem !default;
|
|
139
|
+
$h2-weight: $font-black !default;
|
|
140
|
+
$h2-line-height: 1.25 !default;
|
|
141
|
+
|
|
142
|
+
$h3-size: 2rem !default;
|
|
143
|
+
$h3-weight: $font-bold !default;
|
|
144
|
+
$h3-line-height: 1.25 !default;
|
|
145
|
+
|
|
146
|
+
$h4-size: 1.75rem !default;
|
|
147
|
+
$h4-weight: $font-bold !default;
|
|
148
|
+
$h4-line-height: 1.25 !default;
|
|
149
|
+
|
|
150
|
+
$h5-size: 1.5rem !default;
|
|
151
|
+
$h5-weight: $font-bold !default;
|
|
152
|
+
$h5-line-height: 1.25 !default;
|
|
153
|
+
|
|
154
|
+
$h6-size: 1.25rem !default;
|
|
155
|
+
$h6-weight: $font-bold !default;
|
|
156
|
+
$h6-line-height: 1.25 !default;
|
|
157
|
+
|
|
158
|
+
$subtitle-size: 1.125rem !default;
|
|
159
|
+
$subtitle-weight: $font-regular !default;
|
|
160
|
+
$subtitle-line-height: 1.5 !default;
|
|
161
|
+
|
|
162
|
+
$body-size: 1rem !default;
|
|
163
|
+
$body-weight: $font-regular !default;
|
|
164
|
+
$body-line-height: 1.5 !default;
|
|
165
|
+
|
|
166
|
+
$caption-size: 0.875rem !default;
|
|
167
|
+
$caption-weight:$font-regular !default;
|
|
168
|
+
$caption-line-height: 1.5 !default;
|
|
169
|
+
|
|
170
|
+
$overline-size: 0.75rem !default;
|
|
171
|
+
$overline-weight: $font-regular !default;
|
|
172
|
+
$overline-line-height: 1.5 !default;
|
|
173
|
+
|
|
174
|
+
// —————————————————————————————————————————————————————————————————
|
|
175
|
+
// breakpoints
|
|
176
|
+
// —————————————————————————————————————————————————————————————————
|
|
177
|
+
|
|
178
|
+
$desktop-lg: 1440px !default;
|
|
179
|
+
$desktop-lg-down: calc(#{$desktop-lg} - 0.02px);
|
|
180
|
+
|
|
181
|
+
$desktop: 1280px !default;
|
|
182
|
+
$desktop-down: calc(#{$desktop} - 0.02px);
|
|
183
|
+
|
|
184
|
+
$laptop: 1024px !default;
|
|
185
|
+
$laptop-down: calc(#{$laptop} - 0.02px);
|
|
186
|
+
|
|
187
|
+
$tablet: 768px !default;
|
|
188
|
+
$tablet-down: calc(#{$tablet} - 0.02px);
|
|
189
|
+
|
|
190
|
+
$mobile: 568px !default;
|
|
191
|
+
$mobile-down: calc(#{$mobile} - 0.02px);
|
|
192
|
+
|
|
193
|
+
$mobile-sm: 350px !default;
|
|
194
|
+
$mobile-sm-down: calc(#{$mobile-sm} - 0.02px);
|
|
195
|
+
|
|
196
|
+
// —————————————————————————————————————————————————————————————————
|
|
197
|
+
// misc
|
|
198
|
+
// —————————————————————————————————————————————————————————————————
|
|
199
|
+
|
|
200
|
+
// box-shadow
|
|
201
|
+
|
|
202
|
+
$box-shadow: 0 0 $spacing-sm 0 rgba($text, 0.2) !default;
|
|
203
|
+
|
|
204
|
+
// transition
|
|
205
|
+
|
|
206
|
+
$transition-md: 0.4s ease 0s !default;
|
|
207
|
+
$transition-lg: 0.8s ease 0s !default;
|
|
208
|
+
|
|
209
|
+
// border-radius
|
|
210
|
+
|
|
211
|
+
$border-radius-sm: $spacing-xs !default;
|
|
212
|
+
$border-radius-md: $spacing-sm !default;
|
|
213
|
+
$border-radius-lg: $spacing-md !default;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
// —————————————————————————————————————————————————————————————————
|
|
2
|
+
// elements
|
|
3
|
+
// color
|
|
4
|
+
// notice
|
|
5
|
+
// bar
|
|
6
|
+
// dense
|
|
7
|
+
// noIcon
|
|
8
|
+
// —————————————————————————————————————————————————————————————————
|
|
9
|
+
|
|
10
|
+
$spacing-alert: $spacing-sm;
|
|
11
|
+
|
|
12
|
+
// —————————————————————————————————————————————————————————————————
|
|
13
|
+
// elements
|
|
14
|
+
// —————————————————————————————————————————————————————————————————
|
|
15
|
+
|
|
16
|
+
.alert {
|
|
17
|
+
border-radius: $spacing-sm;
|
|
18
|
+
background-color: $info-light;
|
|
19
|
+
color: $info-text;
|
|
20
|
+
padding: $spacing-alert;
|
|
21
|
+
position: fixed;
|
|
22
|
+
top: $spacing-md;
|
|
23
|
+
right: $spacing-md;
|
|
24
|
+
max-width: $spacing-xxl*3;
|
|
25
|
+
min-width: $spacing-xxl*2;
|
|
26
|
+
z-index: 200;
|
|
27
|
+
|
|
28
|
+
&:not(.alert--bar) {
|
|
29
|
+
padding-left: $spacing-lg + $spacing-sm;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@include responsive(down, mobile) {
|
|
33
|
+
@include calc(max-width, '100vw - '$spacing-md);
|
|
34
|
+
right: 8px;
|
|
35
|
+
top: $spacing-sm;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@include responsive(down, mobile-sm) {
|
|
39
|
+
@include calc(width, '100vw - '$spacing-md);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:before {
|
|
43
|
+
content: "";
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: $spacing-alert;
|
|
46
|
+
left: $spacing-sm;
|
|
47
|
+
height: $spacing-md*1.5;
|
|
48
|
+
width: $spacing-md*1.5;
|
|
49
|
+
background-size: cover;
|
|
50
|
+
background-repeat: no-repeat;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__title {
|
|
54
|
+
font-weight: $font-bold;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__subtitle {
|
|
58
|
+
@extend .caption;
|
|
59
|
+
padding-bottom: 0.2em;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__close {
|
|
63
|
+
transition: opacity $transition-md;
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: $spacing-sm;
|
|
66
|
+
right: $spacing-sm;
|
|
67
|
+
line-height: 0;
|
|
68
|
+
|
|
69
|
+
svg {
|
|
70
|
+
width: $spacing-sm;
|
|
71
|
+
height: $spacing-sm;
|
|
72
|
+
fill: $success-dark
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
opacity: 0.5;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// —————————————————————————————————————————————————————————————————
|
|
82
|
+
// color
|
|
83
|
+
// —————————————————————————————————————————————————————————————————
|
|
84
|
+
|
|
85
|
+
@mixin color($color, $color-light: $info-light, $color-text: $info-text) {
|
|
86
|
+
@if $color == success { $color-light: $success-light; $color-text: $success-text; }
|
|
87
|
+
@else if $color == info { $color-light: $info-light; $color-text: $info-text; }
|
|
88
|
+
@else if $color == warning { $color-light: $warning-light; $color-text: $warning-text; }
|
|
89
|
+
@else if $color == error { $color-light: $error-light; $color-text: $error-text; }
|
|
90
|
+
|
|
91
|
+
background-color: $color-light;
|
|
92
|
+
color: $color-text;
|
|
93
|
+
|
|
94
|
+
&:not(.alert--bar):before {
|
|
95
|
+
|
|
96
|
+
@if $color == success { content: url('../icons/phosphor/check-circle.svg'); }
|
|
97
|
+
@else if $color == info { content: url('../icons/phosphor/info.svg'); }
|
|
98
|
+
@else if $color == warning { content: url('../icons/phosphor/warning.svg'); }
|
|
99
|
+
@else if $color == error { content: url('../icons/phosphor/x-circle.svg'); }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.alert {
|
|
104
|
+
|
|
105
|
+
&--success { @include color(success); }
|
|
106
|
+
&--info { @include color(info); }
|
|
107
|
+
&--warning { @include color(warning); }
|
|
108
|
+
&--error { @include color(error); }
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// —————————————————————————————————————————————————————————————————
|
|
112
|
+
// notice
|
|
113
|
+
// —————————————————————————————————————————————————————————————————
|
|
114
|
+
|
|
115
|
+
.alert {
|
|
116
|
+
|
|
117
|
+
&--notice {
|
|
118
|
+
position: relative;
|
|
119
|
+
max-width: none;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// —————————————————————————————————————————————————————————————————
|
|
124
|
+
// bar
|
|
125
|
+
// —————————————————————————————————————————————————————————————————
|
|
126
|
+
|
|
127
|
+
.alert {
|
|
128
|
+
|
|
129
|
+
&--bar {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 0;
|
|
132
|
+
right: 0;
|
|
133
|
+
bottom: 0;
|
|
134
|
+
max-width: none;
|
|
135
|
+
width: 100%; // needed for small devices to not overflow the container
|
|
136
|
+
z-index: 1;
|
|
137
|
+
border-radius: 0;
|
|
138
|
+
text-align: center;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// —————————————————————————————————————————————————————————————————
|
|
143
|
+
// dense
|
|
144
|
+
// —————————————————————————————————————————————————————————————————
|
|
145
|
+
|
|
146
|
+
.alert--dense {
|
|
147
|
+
padding: $spacing-alert*0.5;
|
|
148
|
+
|
|
149
|
+
&:before {
|
|
150
|
+
top: $spacing-alert*0.5;
|
|
151
|
+
left: $spacing-alert*0.5;
|
|
152
|
+
height: $spacing-md*1.25;
|
|
153
|
+
width: $spacing-md*1.25;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:not(.alert--bar) {
|
|
157
|
+
padding-left: $spacing-md*1.75;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.alert__title {
|
|
161
|
+
|
|
162
|
+
+ .alert__title,
|
|
163
|
+
+ .alert__subtitle {
|
|
164
|
+
margin-top: 0;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.alert__title { @extend .caption; }
|
|
169
|
+
.alert__subtitle { @extend .overline; }
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// —————————————————————————————————————————————————————————————————
|
|
173
|
+
// noIcon
|
|
174
|
+
// —————————————————————————————————————————————————————————————————
|
|
175
|
+
|
|
176
|
+
.alert.alert {
|
|
177
|
+
|
|
178
|
+
&--noIcon {
|
|
179
|
+
padding-left: $spacing-md;
|
|
180
|
+
|
|
181
|
+
&.alert--dense {
|
|
182
|
+
padding-left: $spacing-sm;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:before {
|
|
186
|
+
display: none;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|