@apolitical/component-library 0.0.4-beta.6 → 0.0.5
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/fonts/Moderat-Black-Italic.woff2 +0 -0
- package/fonts/Moderat-Black.woff2 +0 -0
- package/fonts/Moderat-Bold-Italic.woff2 +0 -0
- package/fonts/Moderat-Bold.woff2 +0 -0
- package/fonts/Moderat-Medium-Italic.woff2 +0 -0
- package/fonts/Moderat-Medium.woff2 +0 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +32 -6
- package/layout/index.d.ts +1 -0
- package/layout/layout.d.ts +6 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/README.md +2 -20
- package/styles/base/_accessibility.scss +26 -0
- package/styles/base/_blockquotes.scss +29 -0
- package/styles/base/_fonts.scss +41 -0
- package/styles/base/_hr.scss +15 -0
- package/styles/{base-styles → base}/_index.scss +3 -1
- package/styles/base/_links.scss +16 -0
- package/styles/base/_lists.scss +27 -0
- package/styles/base/_text.scss +80 -0
- package/styles/base/_titles.scss +130 -0
- package/styles/base/buttons/_buttons.scss +234 -0
- package/styles/index.scss +4 -2
- package/styles/mixins/_index.scss +0 -1
- package/styles/variables/assets/_assets.scss +1 -3
- package/styles/base-styles/_accessibility.scss +0 -31
- package/styles/base-styles/_blockquotes.scss +0 -31
- package/styles/base-styles/_hr.scss +0 -17
- package/styles/base-styles/_links.scss +0 -18
- package/styles/base-styles/_lists.scss +0 -30
- package/styles/base-styles/_text.scss +0 -83
- package/styles/base-styles/_titles.scss +0 -132
- package/styles/base-styles/buttons/_buttons.scss +0 -236
- package/styles/mixins/_selectors.scss +0 -8
- /package/styles/{base-styles → base}/buttons/_icons.scss +0 -0
- /package/styles/{base-styles → base}/buttons/_index.scss +0 -0
- /package/styles/{base-styles → base}/buttons/_mixins.scss +0 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../mixins',
|
|
4
|
+
'./../variables';
|
|
5
|
+
|
|
6
|
+
$pre-title: ('font-size': 14, 'font-size_md': 16, 'letter-spacing': 1.28, 'line-height': 16, 'line-height_md': 20, 'margin-bottom': 24);
|
|
7
|
+
$title: ('font-size': 32, 'font-size_md': 52, 'letter-spacing': -0.16, 'line-height': 40, 'line-height_md': 64, 'margin-bottom': 16, 'margin-bottom_md': 32);
|
|
8
|
+
$h1: ('font-size': 28, 'font-size_md': 40, 'line-height': 32, 'line-height_md': 48, 'letter-spacing': -0.16, 'margin-bottom': 16);
|
|
9
|
+
$h2: ('font-size': 24, 'font-size_md': 28, 'line-height': 32, 'line-height_md': 40, 'margin-top': 40, 'margin-bottom': 16);
|
|
10
|
+
$h3: ('font-size': 20, 'font-size_md': 24, 'line-height': 28, 'line-height_md': 32, 'margin-top': 60, 'margin-bottom': 20);
|
|
11
|
+
$h4: ('font-size': 18, 'font-size_md': 20, 'line-height': 24, 'line-height_md': 28, 'margin-top': 40, 'margin-bottom': 20);
|
|
12
|
+
$h5: ('font-size': 12, 'font-size_md': 14, 'line-height': 16, 'margin-top': 16, 'margin-bottom': 16);
|
|
13
|
+
$h6: ('font-size': 12, 'font-size_md': 11, 'line-height': 16);
|
|
14
|
+
$subtitle: ('font-size': 20, 'font-size_md': 24, 'line-height': 28, 'line-height_md': 32, 'margin-bottom': 20);
|
|
15
|
+
|
|
16
|
+
@layer base {
|
|
17
|
+
.pre-title, h5, h6 {
|
|
18
|
+
color: map.get($theme, 'title');
|
|
19
|
+
text-transform: uppercase;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.title, h1, h2, h3, h4 {
|
|
24
|
+
color: map.get($theme, 'title');
|
|
25
|
+
font-weight: 900;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pre-title {
|
|
29
|
+
margin-bottom: px-to-rem(map.get($pre-title, 'margin-bottom'));
|
|
30
|
+
font-size: px-to-rem(map.get($pre-title, 'font-size'));
|
|
31
|
+
line-height: px-to-rem(map.get($pre-title, 'line-height'));
|
|
32
|
+
letter-spacing: px-to-rem(map.get($pre-title, 'letter-spacing'));
|
|
33
|
+
text-transform: uppercase;
|
|
34
|
+
|
|
35
|
+
@include breakpoint('min-width', 'md') {
|
|
36
|
+
font-size: px-to-rem(map.get($pre-title, 'font-size_md'));
|
|
37
|
+
line-height: px-to-rem(map.get($title, 'line-height_md'));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.title {
|
|
42
|
+
margin-bottom: px-to-rem(map.get($title, 'margin-bottom'));
|
|
43
|
+
font-size: px-to-rem(map.get($title, 'font-size'));
|
|
44
|
+
line-height: px-to-rem(map.get($title, 'line-height'));
|
|
45
|
+
letter-spacing: px-to-rem(map.get($title, 'letter-spacing'));
|
|
46
|
+
|
|
47
|
+
@include breakpoint('min-width', 'md') {
|
|
48
|
+
font-size: px-to-rem(map.get($title, 'font-size_md'));
|
|
49
|
+
line-height: px-to-rem(map.get($title, 'line-height_md'));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
h1 {
|
|
54
|
+
margin-bottom: px-to-rem(map.get($h1, 'margin-bottom'));
|
|
55
|
+
font-size: px-to-rem(map.get($h1, 'font-size'));
|
|
56
|
+
line-height: px-to-rem(map.get($h1, 'line-height'));
|
|
57
|
+
letter-spacing: px-to-rem(map.get($h1, 'letter-spacing'));
|
|
58
|
+
|
|
59
|
+
@include breakpoint('min-width', 'md') {
|
|
60
|
+
font-size: px-to-rem(map.get($h1, 'font-size_md'));
|
|
61
|
+
line-height: px-to-rem(map.get($h1, 'line-height_md'));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
h2 {
|
|
66
|
+
margin: px-to-rem(map.get($h2, 'margin-top')) 0 px-to-rem(map.get($h2, 'margin-bottom')) 0;
|
|
67
|
+
font-size: px-to-rem(map.get($h2, 'font-size'));
|
|
68
|
+
line-height: px-to-rem(map.get($h2, 'line-height'));
|
|
69
|
+
|
|
70
|
+
@include breakpoint('min-width', 'md') {
|
|
71
|
+
font-size: px-to-rem(map.get($h2, 'font-size_md'));
|
|
72
|
+
line-height: px-to-rem(map.get($h2, 'line-height_md'));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
h3 {
|
|
77
|
+
margin: px-to-rem(map.get($h3, 'margin-top')) 0 px-to-rem(map.get($h3, 'margin-bottom')) 0;
|
|
78
|
+
font-size: px-to-rem(map.get($h3, 'font-size'));
|
|
79
|
+
line-height: px-to-rem(map.get($h3, 'line-height'));
|
|
80
|
+
|
|
81
|
+
@include breakpoint('min-width', 'md') {
|
|
82
|
+
font-size: px-to-rem(map.get($h3, 'font-size_md'));
|
|
83
|
+
line-height: px-to-rem(map.get($h3, 'line-height_md'));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
h4 {
|
|
88
|
+
margin: px-to-rem(map.get($h4, 'margin-top')) 0 px-to-rem(map.get($h4, 'margin-bottom')) 0;
|
|
89
|
+
font-size: px-to-rem(map.get($h4, 'font-size'));
|
|
90
|
+
line-height: px-to-rem(map.get($h4, 'line-height'));
|
|
91
|
+
|
|
92
|
+
@include breakpoint('min-width', 'md') {
|
|
93
|
+
font-size: px-to-rem(map.get($h4, 'font-size_md'));
|
|
94
|
+
line-height: px-to-rem(map.get($h4, 'line-height_md'));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
h5 {
|
|
100
|
+
margin: px-to-rem(map.get($h5, 'margin-top')) 0 px-to-rem(map.get($h5, 'margin-bottom')) 0;
|
|
101
|
+
font-size: px-to-rem(map.get($h5, 'font-size'));
|
|
102
|
+
line-height: px-to-rem(map.get($h5, 'line-height'));
|
|
103
|
+
|
|
104
|
+
@include breakpoint('min-width', 'md') {
|
|
105
|
+
font-size: px-to-rem(map.get($h5, 'font-size_md'));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
h6 {
|
|
110
|
+
font-size: px-to-rem(map.get($h6, 'font-size'));
|
|
111
|
+
line-height: px-to-rem(map.get($h6, 'line-height'));
|
|
112
|
+
|
|
113
|
+
@include breakpoint('min-width', 'md') {
|
|
114
|
+
font-size: px-to-rem(map.get($h6, 'font-size_md'));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.subtitle {
|
|
119
|
+
margin-bottom: px-to-rem(map.get($subtitle, 'margin-bottom'));
|
|
120
|
+
font-size: px-to-rem(map.get($subtitle, 'font-size'));
|
|
121
|
+
color: map.get($theme, 'subtitle');
|
|
122
|
+
font-weight: 400;
|
|
123
|
+
line-height: px-to-rem(map.get($subtitle, 'line-height'));
|
|
124
|
+
|
|
125
|
+
@include breakpoint('min-width', 'md') {
|
|
126
|
+
font-size: px-to-rem(map.get($subtitle, 'font-size_md'));
|
|
127
|
+
line-height: px-to-rem(map.get($subtitle, 'line-height_md'));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
3
|
+
@import './../../functions',
|
|
4
|
+
'./../../mixins',
|
|
5
|
+
'./../../variables';
|
|
6
|
+
@import './icons', './mixins';
|
|
7
|
+
|
|
8
|
+
// The button defaults to the primary variant and medium styling so are not added as classes - they live on the default `button` styling
|
|
9
|
+
$large: ('font-size': 18, 'padding-top': 14, 'padding-horizontal': 24, 'padding-bottom': 16, 'icon-width': 18, 'icon-offset': 2, 'icon-gutter': 12);
|
|
10
|
+
$medium: ('font-size': 16, 'padding-top': 10, 'padding-horizontal': 24, 'padding-bottom': 12, 'icon-width': 16, 'icon-offset': 2, 'icon-gutter': 10);
|
|
11
|
+
$small: ('font-size': 14, 'padding-top': 8, 'padding-horizontal': 16, 'padding-bottom': 10, 'icon-width': 12, 'icon-offset': 2, 'icon-gutter': 8);
|
|
12
|
+
$sizes: ('large', $large), ('small', $small);
|
|
13
|
+
$secondary: ('border': 1);
|
|
14
|
+
|
|
15
|
+
// The tertiary styling has its own padding; regardless of size, we add a tiny amount of padding to accommodate
|
|
16
|
+
// the focus outline and to ensure any icons are centered
|
|
17
|
+
$tertiary: ('padding-top': 1.6, 'padding-horizontal': 8,'padding-bottom': 3.2);
|
|
18
|
+
$animation: ('scale': 1.1, 'duration': 0.5, 'iteration': 1);
|
|
19
|
+
|
|
20
|
+
@layer base {
|
|
21
|
+
button, .button {
|
|
22
|
+
background: map.get($theme, 'button_primary_bg');
|
|
23
|
+
padding: px-to-rem(map.get($medium, 'padding-top')) px-to-rem(map.get($medium, 'padding-horizontal'))
|
|
24
|
+
px-to-rem(map.get($medium, 'padding-bottom')) px-to-rem(map.get($medium, 'padding-horizontal'));
|
|
25
|
+
position: relative;
|
|
26
|
+
text-align: center;
|
|
27
|
+
font-size: px-to-rem(map.get($medium, 'font-size'));
|
|
28
|
+
color: map.get($theme, 'button_primary');
|
|
29
|
+
font-weight: 700;
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
border-radius: 360rem; // Completely round corners. This could be any large number but 360 evokes a circle well!
|
|
32
|
+
border: none;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
display: inline-block;
|
|
36
|
+
|
|
37
|
+
&:hover {
|
|
38
|
+
background: map.get($theme, 'button_primary_bg_hover');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:active {
|
|
42
|
+
background: map.get($theme, 'button_primary_bg_active');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus, &:focus-visible {
|
|
46
|
+
background: map.get($theme, 'button_primary_bg_focus');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@each $size, $styles in $sizes {
|
|
50
|
+
&.#{$size} {
|
|
51
|
+
padding: px-to-rem(map.get($styles, 'padding-top')) px-to-rem(map.get($styles, 'padding-horizontal'))
|
|
52
|
+
px-to-rem(map.get($styles, 'padding-bottom')) px-to-rem(map.get($styles, 'padding-horizontal'));
|
|
53
|
+
font-size: px-to-rem(map.get($styles, 'font-size'));
|
|
54
|
+
|
|
55
|
+
&.icon {
|
|
56
|
+
margin-top: px-to-rem(map.get($styles, 'icon-offset'));
|
|
57
|
+
|
|
58
|
+
&.left::before { margin-right: px-to-rem(map.get($styles, 'icon-gutter')); }
|
|
59
|
+
&.right::before { margin-left: px-to-rem(map.get($styles, 'icon-gutter')); }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.full-width {
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.destructive {
|
|
69
|
+
&, &:hover, &:active, &:focus, &:focus-visible {
|
|
70
|
+
background: map.get($theme, 'button_primary_destructive_bg');
|
|
71
|
+
color: map.get($theme, 'button_primary_destructive');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:hover, &:active {
|
|
75
|
+
background: map.get($theme, 'button_primary_destructive_bg_hover');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:focus, &:focus-visible {
|
|
79
|
+
box-shadow: $outline map.get($theme, 'button_primary_destructive_box-shadow');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.secondary {
|
|
85
|
+
background: map.get($theme, 'button_secondary_bg');
|
|
86
|
+
color: map.get($theme, 'button_secondary');
|
|
87
|
+
border: px-to-rem(map.get($secondary, 'border')) solid map.get($theme, 'button_secondary_border');
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
background: map.get($theme, 'button_secondary_bg_hover');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:active, &:focus, &:focus-visible {
|
|
94
|
+
color: map.get($theme, 'button_secondary_focus');
|
|
95
|
+
border-color: map.get($theme, 'button_secondary_border_focus');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:active {
|
|
99
|
+
background: map.get($theme, 'button_secondary_bg_active');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:focus, &:focus-visible {
|
|
103
|
+
background: map.get($theme, 'button_secondary_bg_focus');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&.muted {
|
|
107
|
+
border-color: map.get($theme, 'button_secondary_border_muted');
|
|
108
|
+
|
|
109
|
+
&, &:hover, &:active, &:focus, &:focus-visible {
|
|
110
|
+
background: map.get($theme, 'button_secondary_bg_muted');
|
|
111
|
+
color: map.get($theme, 'button_secondary_muted');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:hover, &:focus, &:focus-visible {
|
|
115
|
+
color: map.get($theme, 'button_secondary_muted_hover');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.disabled {
|
|
120
|
+
&, &:hover, &:active, &:focus, &:focus-visible {
|
|
121
|
+
background: map.get($theme, 'button_secondary_bg_disabled');
|
|
122
|
+
color: map.get($theme, 'button_secondary_disabled');
|
|
123
|
+
border-color: map.get($theme, 'button_secondary_border_disabled');
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&.tertiary {
|
|
129
|
+
@include transition(color text-decoration-color);
|
|
130
|
+
|
|
131
|
+
padding: px-to-rem(map.get($tertiary, 'padding-top')) px-to-rem(map.get($tertiary, 'padding-horizontal'))
|
|
132
|
+
px-to-rem(map.get($tertiary, 'padding-bottom')) px-to-rem(map.get($tertiary, 'padding-horizontal'));
|
|
133
|
+
bottom: px-to-rem(map.get($tertiary, 'padding-top'));
|
|
134
|
+
right: px-to-rem(map.get($tertiary, 'padding-horizontal'));
|
|
135
|
+
text-decoration: underline;
|
|
136
|
+
text-decoration-color: transparent;
|
|
137
|
+
|
|
138
|
+
&, &:focus, &:focus-visible {
|
|
139
|
+
background: map.get($theme, 'button_tertiary_bg');
|
|
140
|
+
color: map.get($theme, 'button_tertiary');
|
|
141
|
+
text-decoration-color: map.get($theme, 'button_tertiary_text-decoration');
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&:hover, &:active {
|
|
145
|
+
text-decoration-color: currentcolor;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:hover {
|
|
149
|
+
color: map.get($theme, 'button_tertiary_hover');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:active {
|
|
153
|
+
color: map.get($theme, 'button_tertiary_active');
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&.muted {
|
|
157
|
+
color: map.get($theme, 'button_tertiary_muted');
|
|
158
|
+
|
|
159
|
+
&:hover, &:focus, &:focus-visible {
|
|
160
|
+
color: map.get($theme, 'button_tertiary_muted_hover');
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&.disabled {
|
|
165
|
+
&, &:hover, &:active, &:focus, &:focus-visible {
|
|
166
|
+
background: map.get($theme, 'button_tertiary_disabled_bg');
|
|
167
|
+
color: map.get($theme, 'button_tertiary_disabled');
|
|
168
|
+
text-decoration-color: map.get($theme, 'button_tertiary_disabled_text-decoration');
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&.icon {
|
|
175
|
+
display: inline-flex;
|
|
176
|
+
flex-flow: row;
|
|
177
|
+
align-content: center;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
|
|
180
|
+
&::before {
|
|
181
|
+
content: '';
|
|
182
|
+
background: currentcolor;
|
|
183
|
+
width: px-to-rem(map.get($medium, 'icon-width'));
|
|
184
|
+
height: px-to-rem(map.get($medium, 'icon-width'));
|
|
185
|
+
display: block;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&.right::before { order: 2; }
|
|
189
|
+
|
|
190
|
+
@each $icon, $large-icon, $medium-icon, $small-icon in $icons {
|
|
191
|
+
$icon-sizes: ('large', $large-icon), ('medium', $medium-icon), ('small', $small-icon);
|
|
192
|
+
|
|
193
|
+
@at-root {
|
|
194
|
+
%icon-#{$icon} { @include icon-styling($icon, $icon-sizes); }
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&.#{$icon} {
|
|
198
|
+
@extend %icon-#{$icon};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&.hover_#{$icon} {
|
|
202
|
+
&:hover, &:focus, &:focus-visible {
|
|
203
|
+
@extend %icon-#{$icon};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&.animate {
|
|
210
|
+
@include animate {
|
|
211
|
+
@keyframes bounce {
|
|
212
|
+
0%, 100% { transform: scale(1); }
|
|
213
|
+
|
|
214
|
+
70% {
|
|
215
|
+
transform: scale(#{map.get($animation, 'scale')});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&:focus, &:active, &.do-animation {
|
|
220
|
+
&::before { animation: bounce #{map.get($animation, 'duration')}s #{map.get($animation, 'iteration')}; }
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&.disabled {
|
|
228
|
+
cursor: not-allowed;
|
|
229
|
+
opacity: 0.3;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
package/styles/index.scss
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@import './../functions',
|
|
3
|
-
'./../mixins',
|
|
4
|
-
'./../variables';
|
|
5
|
-
|
|
6
|
-
@layer base {
|
|
7
|
-
#root {
|
|
8
|
-
|
|
9
|
-
/* stylelint-disable no-descending-specificity */
|
|
10
|
-
a, button, input, textarea, [role="menu"], li[tabindex] {
|
|
11
|
-
&:focus, &:focus-visible {
|
|
12
|
-
outline: none;
|
|
13
|
-
box-shadow: $outline map.get($theme, 'default_focus');
|
|
14
|
-
}
|
|
15
|
-
&:active { box-shadow: none; }
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
[role="menu"], [role="menu"] a, li[tabindex] {
|
|
19
|
-
&:focus, &:focus-visible { box-shadow: $outline map.get($theme, 'default_focus') inset; }
|
|
20
|
-
}
|
|
21
|
-
/* stylelint-enable no-descending-specificity */
|
|
22
|
-
|
|
23
|
-
.hidden {
|
|
24
|
-
width: 0;
|
|
25
|
-
height: 0;
|
|
26
|
-
display: block;
|
|
27
|
-
overflow: hidden;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@import './../functions',
|
|
3
|
-
'./../mixins',
|
|
4
|
-
'./../variables';
|
|
5
|
-
|
|
6
|
-
$blockquote: ('margin-top': 20, 'margin-top_md': 30, 'margin-bottom': 10, 'margin-bottom_md': 20, 'padding-vertical': 4, 'padding-left': 24, 'font-size': 18, 'font-size_md': 20, 'line-height': 28, 'border-width': 6);
|
|
7
|
-
|
|
8
|
-
@layer base {
|
|
9
|
-
#root {
|
|
10
|
-
blockquote {
|
|
11
|
-
margin: px-to-rem(map.get($blockquote, 'margin-top')) 0 px-to-rem(map.get($blockquote, 'margin-bottom')) 0;
|
|
12
|
-
padding: px-to-rem(map.get($blockquote, 'padding-vertical')) 0 0 px-to-rem(map.get($blockquote, 'padding-left'));
|
|
13
|
-
font-size: px-to-rem(map.get($blockquote, 'font-size'));
|
|
14
|
-
color: map.get($theme, 'blockquote');
|
|
15
|
-
font-weight: 700;
|
|
16
|
-
font-style: italic;
|
|
17
|
-
line-height: px-to-rem(map.get($blockquote, 'line-height'));
|
|
18
|
-
border-left: px-to-rem(map.get($blockquote, 'border-width')) solid map.get($theme, 'blockquote_border');
|
|
19
|
-
|
|
20
|
-
p:last-of-type {
|
|
21
|
-
margin-bottom: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@include breakpoint('min-width', 'md') {
|
|
25
|
-
margin-top: px-to-rem(map.get($blockquote, 'margin-top_md'));
|
|
26
|
-
margin-bottom: px-to-rem(map.get($blockquote, 'margin-bottom_md'));
|
|
27
|
-
font-size: px-to-rem(map.get($blockquote, 'font-size_md'));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@import './../functions',
|
|
3
|
-
'./../variables';
|
|
4
|
-
|
|
5
|
-
$hr: ('height': 1, 'margin-vertical': 40);
|
|
6
|
-
|
|
7
|
-
@layer base {
|
|
8
|
-
#root {
|
|
9
|
-
hr {
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: px-to-rem(map.get($hr, 'height'));
|
|
12
|
-
background: map.get($theme, 'divider');
|
|
13
|
-
margin: px-to-rem(map.get($hr, 'margin-vertical')) auto;
|
|
14
|
-
border: none;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@import './../variables';
|
|
3
|
-
|
|
4
|
-
@layer base {
|
|
5
|
-
#root {
|
|
6
|
-
a {
|
|
7
|
-
color: map.get($theme, 'link');
|
|
8
|
-
text-decoration: underline;
|
|
9
|
-
font-weight: 900;
|
|
10
|
-
|
|
11
|
-
&:hover,
|
|
12
|
-
&:focus,
|
|
13
|
-
&:active {
|
|
14
|
-
color: map.get($theme, 'link_hover');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@import './../functions',
|
|
3
|
-
'./../mixins';
|
|
4
|
-
|
|
5
|
-
$ul: ('margin-bottom': 16, 'padding-left': 40);
|
|
6
|
-
$li: ('margin-bottom': 18, 'margin-bottom_sm': 12, 'margin-bottom_md': 16);
|
|
7
|
-
|
|
8
|
-
@layer base {
|
|
9
|
-
#root {
|
|
10
|
-
ol, ul {
|
|
11
|
-
margin: 0 0 px-to-rem(map.get($ul, 'margin-bottom')) 0;
|
|
12
|
-
padding-left: px-to-rem(map.get($ul, 'padding-left'));
|
|
13
|
-
display: block;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
li {
|
|
17
|
-
margin-bottom: px-to-rem(map.get($li, 'margin-bottom'));
|
|
18
|
-
|
|
19
|
-
@include selector-after-root('.text-small') { margin-bottom: px-to-rem(map.get($li, 'margin-bottom_sm')); }
|
|
20
|
-
|
|
21
|
-
@include selector-after-root('.text-medium') { margin-bottom: px-to-rem(map.get($li, 'margin-bottom_md')); }
|
|
22
|
-
|
|
23
|
-
&:last-child {
|
|
24
|
-
margin-bottom: 0;
|
|
25
|
-
|
|
26
|
-
p:last-child { margin-bottom: 0; }
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@import './../functions',
|
|
3
|
-
'./../mixins',
|
|
4
|
-
'./../variables';
|
|
5
|
-
|
|
6
|
-
$default: ('font-size': 16, 'font-size_md': 18, 'line-height': 24, 'line-height_md': 28, 'margin-bottom': 20); // The default size is the 'large paragraph' in Figma
|
|
7
|
-
$small: ('font-size': 12, 'font-size_md': 14, 'letter-spacing': 0.16, 'line-height': 16, 'margin-bottom': 16);
|
|
8
|
-
$medium: ('font-size': 14, 'font-size_md': 16, 'line-height': 16, 'line-height_md': 20, 'margin-bottom': 18);
|
|
9
|
-
$sup: ('font-size': 10);
|
|
10
|
-
|
|
11
|
-
@layer base {
|
|
12
|
-
#root {
|
|
13
|
-
p, li, small {
|
|
14
|
-
color: map.get($theme, 'text');
|
|
15
|
-
font-weight: 500;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
p, li {
|
|
19
|
-
font-size: px-to-rem(map.get($default, 'font-size'));
|
|
20
|
-
line-height: px-to-rem(map.get($default, 'line-height'));
|
|
21
|
-
|
|
22
|
-
@include selector-after-root('.text-small') {
|
|
23
|
-
font-size: px-to-rem(map.get($small, 'font-size'));
|
|
24
|
-
line-height: px-to-rem(map.get($small, 'line-height'));
|
|
25
|
-
letter-spacing: px-to-rem(map.get($small, 'letter-spacing'));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@include selector-after-root('.text-medium') {
|
|
29
|
-
font-size: px-to-rem(map.get($medium, 'font-size'));
|
|
30
|
-
line-height: px-to-rem(map.get($medium, 'line-height'));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@include breakpoint('min-width', 'md') {
|
|
34
|
-
font-size: px-to-rem(map.get($default, 'font-size_md'));
|
|
35
|
-
line-height: px-to-rem(map.get($default, 'line-height_md'));
|
|
36
|
-
|
|
37
|
-
@include selector-after-root('.text-small') {
|
|
38
|
-
font-size: px-to-rem(map.get($small, 'font-size_md'));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@include selector-after-root('.text-medium') {
|
|
42
|
-
font-size: px-to-rem(map.get($medium, 'font-size_md'));
|
|
43
|
-
line-height: px-to-rem(map.get($medium, 'line-height_md'));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
p {
|
|
49
|
-
margin-bottom: px-to-rem(map.get($default, 'margin-bottom'));
|
|
50
|
-
|
|
51
|
-
@include selector-after-root('.text-small') { margin-bottom: px-to-rem(map.get($small, 'margin-bottom')); }
|
|
52
|
-
|
|
53
|
-
@include selector-after-root('.text-medium') { margin-bottom: px-to-rem(map.get($medium, 'margin-bottom')); }
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
small {
|
|
57
|
-
font-size: px-to-rem(map.get($small, 'font-size'));
|
|
58
|
-
line-height: px-to-rem(map.get($small, 'line-height'));
|
|
59
|
-
|
|
60
|
-
@include breakpoint('min-width', 'md') {
|
|
61
|
-
font-size: px-to-rem(map.get($small, 'font-size_md'));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
strong { font-weight: 900; }
|
|
66
|
-
em, i { font-style: italic; }
|
|
67
|
-
|
|
68
|
-
sup, sub {
|
|
69
|
-
font-size: px-to-rem(map.get($sup, 'font-size'));
|
|
70
|
-
line-height: normal;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
sup {
|
|
74
|
-
vertical-align: super;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
sub {
|
|
78
|
-
vertical-align: sub;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
}
|