@haiilo/catalyst 0.7.1 → 0.7.2
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/dist/catalyst/scss/_mixins.scss +9 -0
- package/dist/catalyst/scss/_variables.scss +64 -0
- package/dist/catalyst/scss/_variables.tokens.scss +84 -0
- package/dist/catalyst/scss/core/_base.scss +12 -0
- package/dist/catalyst/scss/core/_nav.scss +23 -0
- package/dist/catalyst/scss/core/_typography.scss +237 -0
- package/dist/catalyst/scss/fonts/_fonts.mixins.azeret.scss +14 -0
- package/dist/catalyst/scss/fonts/_fonts.mixins.dm.scss +53 -0
- package/dist/catalyst/scss/fonts/_fonts.mixins.lato.scss +185 -0
- package/dist/catalyst/scss/fonts/_fonts.mixins.scss +3 -0
- package/dist/catalyst/scss/fonts/_fonts.scss +13 -0
- package/dist/catalyst/scss/index.scss +32 -0
- package/dist/catalyst/scss/utils/_color.scss +52 -0
- package/dist/catalyst/scss/utils/_disabled.mixins.scss +7 -0
- package/dist/catalyst/scss/utils/_display.scss +20 -0
- package/dist/catalyst/scss/utils/_elevation.mixins.scss +10 -0
- package/dist/catalyst/scss/utils/_elevation.scss +19 -0
- package/dist/catalyst/scss/utils/_layout.scss +78 -0
- package/dist/catalyst/scss/utils/_media.mixins.scss +37 -0
- package/dist/catalyst/scss/utils/_ratio.mixins.scss +12 -0
- package/dist/catalyst/scss/utils/_ratio.scss +20 -0
- package/dist/catalyst/scss/utils/_sizing.mixins.scss +15 -0
- package/dist/catalyst/scss/utils/_sizing.scss +16 -0
- package/dist/catalyst/scss/utils/_spacing.mixins.scss +5 -0
- package/dist/catalyst/scss/utils/_spacing.scss +49 -0
- package/dist/catalyst/scss/utils/_toast.scss +77 -0
- package/dist/catalyst/scss/utils/_typography.mixins.scss +102 -0
- package/dist/catalyst/scss/utils/_typography.scss +34 -0
- package/dist/catalyst/scss/utils/_visibility.mixins.scss +29 -0
- package/dist/catalyst/scss/utils/_visibility.scss +13 -0
- package/dist/collection/scss/_mixins.scss +9 -0
- package/dist/collection/scss/_variables.scss +64 -0
- package/dist/collection/scss/_variables.tokens.scss +84 -0
- package/dist/collection/scss/core/_base.scss +12 -0
- package/dist/collection/scss/core/_nav.scss +23 -0
- package/dist/collection/scss/core/_typography.scss +237 -0
- package/dist/collection/scss/fonts/_fonts.mixins.azeret.scss +14 -0
- package/dist/collection/scss/fonts/_fonts.mixins.dm.scss +53 -0
- package/dist/collection/scss/fonts/_fonts.mixins.lato.scss +185 -0
- package/dist/collection/scss/fonts/_fonts.mixins.scss +3 -0
- package/dist/collection/scss/fonts/_fonts.scss +13 -0
- package/dist/collection/scss/index.scss +32 -0
- package/dist/collection/scss/utils/_color.scss +52 -0
- package/dist/collection/scss/utils/_disabled.mixins.scss +7 -0
- package/dist/collection/scss/utils/_display.scss +20 -0
- package/dist/collection/scss/utils/_elevation.mixins.scss +10 -0
- package/dist/collection/scss/utils/_elevation.scss +19 -0
- package/dist/collection/scss/utils/_layout.scss +78 -0
- package/dist/collection/scss/utils/_media.mixins.scss +37 -0
- package/dist/collection/scss/utils/_ratio.mixins.scss +12 -0
- package/dist/collection/scss/utils/_ratio.scss +20 -0
- package/dist/collection/scss/utils/_sizing.mixins.scss +15 -0
- package/dist/collection/scss/utils/_sizing.scss +16 -0
- package/dist/collection/scss/utils/_spacing.mixins.scss +5 -0
- package/dist/collection/scss/utils/_spacing.scss +49 -0
- package/dist/collection/scss/utils/_toast.scss +77 -0
- package/dist/collection/scss/utils/_typography.mixins.scss +102 -0
- package/dist/collection/scss/utils/_typography.scss +34 -0
- package/dist/collection/scss/utils/_visibility.mixins.scss +29 -0
- package/dist/collection/scss/utils/_visibility.scss +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@forward 'fonts/fonts.mixins';
|
|
2
|
+
@forward 'utils/disabled.mixins';
|
|
3
|
+
@forward 'utils/elevation.mixins';
|
|
4
|
+
@forward 'utils/media.mixins';
|
|
5
|
+
@forward 'utils/sizing.mixins';
|
|
6
|
+
@forward 'utils/spacing.mixins';
|
|
7
|
+
@forward 'utils/typography.mixins';
|
|
8
|
+
@forward 'utils/visibility.mixins';
|
|
9
|
+
@forward 'utils/ratio.mixins';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use 'variables.tokens' as *;
|
|
2
|
+
@forward 'variables.tokens';
|
|
3
|
+
|
|
4
|
+
// --------
|
|
5
|
+
// -- Composits
|
|
6
|
+
// --------
|
|
7
|
+
|
|
8
|
+
$cat-head-margin-bottom: cat-token('size.spacing.s');
|
|
9
|
+
$cat-body-margin-bottom: cat-token('size.spacing.m');
|
|
10
|
+
$cat-nav-padding-horizontal: cat-token('size.spacing.m');
|
|
11
|
+
|
|
12
|
+
// --------
|
|
13
|
+
// -- z-indexes
|
|
14
|
+
// --------
|
|
15
|
+
|
|
16
|
+
$cat-menu-z-index: 100;
|
|
17
|
+
$cat-tooltip-z-index: 200;
|
|
18
|
+
|
|
19
|
+
// --------
|
|
20
|
+
// -- Typography
|
|
21
|
+
// --------
|
|
22
|
+
|
|
23
|
+
/* stylelint-disable value-keyword-case */
|
|
24
|
+
$font-fallback-sans-serif: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans',
|
|
25
|
+
'Liberation Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !default;
|
|
26
|
+
$font-fallback-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace !default;
|
|
27
|
+
$cat-link-text-decoration: none;
|
|
28
|
+
$cat-link-text-decoration-hover: underline;
|
|
29
|
+
$cat-mark-color: cat-token('color.theme.primary.bg', 0.2);
|
|
30
|
+
/* stylelint-enable value-keyword-case */
|
|
31
|
+
|
|
32
|
+
// --------
|
|
33
|
+
// -- Scrollable
|
|
34
|
+
// --------
|
|
35
|
+
|
|
36
|
+
$cat-scrollable-shadow: 0 0 4px 1px rgba(16, 29, 48, 20%);
|
|
37
|
+
$cat-scrollable-shadow-transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
38
|
+
|
|
39
|
+
// --------
|
|
40
|
+
// -- Elevations
|
|
41
|
+
// --------
|
|
42
|
+
|
|
43
|
+
$cat-elevation-transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
44
|
+
$cat-elevation: (
|
|
45
|
+
0: none,
|
|
46
|
+
1: (
|
|
47
|
+
0 1px 4px 0 rgba(16, 29, 48, 20%)
|
|
48
|
+
),
|
|
49
|
+
2: (
|
|
50
|
+
0 2px 4px -1px rgba(16, 29, 48, 20%),
|
|
51
|
+
0 4px 5px 0 rgba(16, 29, 48, 26%),
|
|
52
|
+
0 1px 10px -1px rgba(16, 29, 48, 12%)
|
|
53
|
+
),
|
|
54
|
+
3: (
|
|
55
|
+
0 2px 4px -1px rgba(16, 29, 48, 20%),
|
|
56
|
+
0 9px 16px -3px rgba(16, 29, 48, 14%),
|
|
57
|
+
0 10px 20px -8px rgba(16, 29, 48, 12%)
|
|
58
|
+
),
|
|
59
|
+
4: (
|
|
60
|
+
0 2px 4px -1px rgba(16, 29, 48, 5%),
|
|
61
|
+
0 9px 16px -3px rgba(16, 29, 48, 14%),
|
|
62
|
+
0 32px 20px -20px rgba(16, 29, 48, 20%)
|
|
63
|
+
)
|
|
64
|
+
);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
@use 'sass:color';
|
|
5
|
+
@use 'sass:string';
|
|
6
|
+
|
|
7
|
+
@use '~@haiilo/catalyst-tokens/dist/scss/variables' as *;
|
|
8
|
+
@forward '~@haiilo/catalyst-tokens/dist/scss/variables' show $tokens;
|
|
9
|
+
|
|
10
|
+
// -----
|
|
11
|
+
// -- Split a string using the given separator.
|
|
12
|
+
// -----
|
|
13
|
+
@function -cat-split($string, $separator: ' ') {
|
|
14
|
+
$result: ();
|
|
15
|
+
$index: string.index($string, $separator);
|
|
16
|
+
@while $index != null {
|
|
17
|
+
$item: string.slice($string, 1, $index - 1);
|
|
18
|
+
$result: list.append($result, $item);
|
|
19
|
+
$string: string.slice($string, $index + string.length($separator));
|
|
20
|
+
$index: string.index($string, $separator);
|
|
21
|
+
}
|
|
22
|
+
$result: list.append($result, $string);
|
|
23
|
+
@return $result;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// -----
|
|
27
|
+
// -- Join strings using the given separator.
|
|
28
|
+
// -----
|
|
29
|
+
@function -cat-join($strings, $separator: ' ') {
|
|
30
|
+
$result: '';
|
|
31
|
+
@each $string in $strings {
|
|
32
|
+
$result: $result + $separator + $string;
|
|
33
|
+
}
|
|
34
|
+
@return string.slice($result, string.length($separator) + 1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// -----
|
|
38
|
+
// -- Deep map.get using a dot-separated key.
|
|
39
|
+
// -----
|
|
40
|
+
@function -cat-get($map, $key) {
|
|
41
|
+
$keys: -cat-split('' + $key, '.');
|
|
42
|
+
@each $key in $keys {
|
|
43
|
+
@if $map {
|
|
44
|
+
$map: map.get($map, $key);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
@return $map;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@function cat-token-wrap($value, $alpha: 1) {
|
|
51
|
+
@if meta.type-of($value) == 'string' {
|
|
52
|
+
@if $alpha < 1 {
|
|
53
|
+
@return rgba($value, $alpha);
|
|
54
|
+
} @else {
|
|
55
|
+
@return rgb($value);
|
|
56
|
+
}
|
|
57
|
+
} @else if meta.type-of($value) == 'list' {
|
|
58
|
+
@return color.adjust(
|
|
59
|
+
#00000000,
|
|
60
|
+
$red: list.nth($value, 1),
|
|
61
|
+
$green: list.nth($value, 2),
|
|
62
|
+
$blue: list.nth($value, 3),
|
|
63
|
+
$alpha: $alpha
|
|
64
|
+
);
|
|
65
|
+
} @else {
|
|
66
|
+
@return $value;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// -----
|
|
71
|
+
// -- Accessor for $tokens using a dot-separated key.
|
|
72
|
+
// -- Automatically wraps RGB partials into an rgb() expression and
|
|
73
|
+
// -- optionally adds an RGB alpha value.
|
|
74
|
+
// -----
|
|
75
|
+
@function cat-token($key, $alpha: 1, $wrap: true) {
|
|
76
|
+
$value: -cat-get($tokens, $key);
|
|
77
|
+
@if not $value {
|
|
78
|
+
@error 'Unknown token "#{-cat-join($key, '.')}".';
|
|
79
|
+
}
|
|
80
|
+
@if $wrap and string.index($key, 'color.') == 1 {
|
|
81
|
+
@return cat-token-wrap($value, $alpha);
|
|
82
|
+
}
|
|
83
|
+
@return $value;
|
|
84
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
@use '../mixins' as *;
|
|
3
|
+
|
|
4
|
+
// ---- Typography
|
|
5
|
+
|
|
6
|
+
body {
|
|
7
|
+
@include cat-body('m');
|
|
8
|
+
font-family: cat-body-font-family();
|
|
9
|
+
font-weight: cat-token('font.weight.body');
|
|
10
|
+
color: cat-token('color.ui.font.body');
|
|
11
|
+
background-color: cat-token('color.ui.background.canvas');
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
@use '../mixins' as *;
|
|
3
|
+
|
|
4
|
+
nav {
|
|
5
|
+
hr,
|
|
6
|
+
.cat-hr {
|
|
7
|
+
margin-top: $cat-nav-padding-horizontal * 0.5;
|
|
8
|
+
margin-bottom: $cat-nav-padding-horizontal * 0.5;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.cat-head,
|
|
12
|
+
.cat-text {
|
|
13
|
+
padding: $cat-nav-padding-horizontal * 0.5 $cat-nav-padding-horizontal;
|
|
14
|
+
|
|
15
|
+
> :last-child {
|
|
16
|
+
margin-bottom: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.cat-head {
|
|
21
|
+
@include cat-head(5);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
@use '../mixins' as *;
|
|
3
|
+
|
|
4
|
+
h1,
|
|
5
|
+
h2,
|
|
6
|
+
h3,
|
|
7
|
+
h4,
|
|
8
|
+
h5,
|
|
9
|
+
h6,
|
|
10
|
+
.cat-h1,
|
|
11
|
+
.cat-h2,
|
|
12
|
+
.cat-h3,
|
|
13
|
+
.cat-h4,
|
|
14
|
+
.cat-h5,
|
|
15
|
+
.cat-h6 {
|
|
16
|
+
margin-top: 0;
|
|
17
|
+
margin-bottom: $cat-head-margin-bottom;
|
|
18
|
+
font-weight: cat-token('font.weight.head');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// -- head styles
|
|
22
|
+
@each $key, $value in cat-token('size.font.head') {
|
|
23
|
+
h#{$key},
|
|
24
|
+
.cat-h#{$key} {
|
|
25
|
+
@include cat-head($key);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// -- body styles
|
|
30
|
+
@each $key, $value in cat-token('size.font.body') {
|
|
31
|
+
.cat-text-#{$key} {
|
|
32
|
+
@include cat-body($key);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// -- mono styles
|
|
37
|
+
@each $key, $value in cat-token('size.font.mono') {
|
|
38
|
+
.cat-mono-#{$key} {
|
|
39
|
+
@include cat-mono($key);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
p {
|
|
44
|
+
margin-top: 0;
|
|
45
|
+
margin-bottom: $cat-body-margin-bottom;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
hr,
|
|
49
|
+
.cat-hr {
|
|
50
|
+
display: block;
|
|
51
|
+
margin: $cat-body-margin-bottom 0;
|
|
52
|
+
border: 0;
|
|
53
|
+
height: 1px;
|
|
54
|
+
background-color: cat-token('color.ui.border.default');
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ----- links
|
|
59
|
+
|
|
60
|
+
a {
|
|
61
|
+
color: cat-token('color.theme.primary.text');
|
|
62
|
+
text-decoration: $cat-link-text-decoration;
|
|
63
|
+
transition: color cat-token('time.transition.s') linear;
|
|
64
|
+
|
|
65
|
+
&:hover {
|
|
66
|
+
color: cat-token('color.theme.primary.textHover');
|
|
67
|
+
text-decoration: $cat-link-text-decoration-hover;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:active {
|
|
71
|
+
color: cat-token('color.theme.primary.textActive');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:focus-visible {
|
|
75
|
+
outline: 2px solid cat-token('color.ui.border.focus');
|
|
76
|
+
// outline-offset: -2px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
a[tabindex='-1']:focus {
|
|
81
|
+
outline: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ----- emphasis
|
|
85
|
+
|
|
86
|
+
b,
|
|
87
|
+
strong,
|
|
88
|
+
.cat-strong {
|
|
89
|
+
font-weight: 600;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
mark,
|
|
93
|
+
.cat-mark {
|
|
94
|
+
padding: 0.125rem 0.25rem;
|
|
95
|
+
background-color: $cat-mark-color;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
small,
|
|
99
|
+
.cat-small {
|
|
100
|
+
font-size: 0.875em;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.cat-underline {
|
|
104
|
+
text-decoration: underline;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cat-line-through {
|
|
108
|
+
text-decoration: line-through;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.cat-muted {
|
|
112
|
+
color: cat-token('color.ui.font.muted');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ----- lists
|
|
116
|
+
|
|
117
|
+
ol,
|
|
118
|
+
ul {
|
|
119
|
+
padding-left: 2rem;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
ol,
|
|
123
|
+
ul,
|
|
124
|
+
dl {
|
|
125
|
+
margin-top: 0;
|
|
126
|
+
margin-bottom: 1rem;
|
|
127
|
+
|
|
128
|
+
ol,
|
|
129
|
+
ul,
|
|
130
|
+
dl {
|
|
131
|
+
margin-bottom: 0;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
nav {
|
|
136
|
+
ol,
|
|
137
|
+
ul {
|
|
138
|
+
list-style-type: none;
|
|
139
|
+
margin: 0;
|
|
140
|
+
padding: 0;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
dt {
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
dd {
|
|
149
|
+
margin-bottom: 0.5rem;
|
|
150
|
+
margin-left: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// ----- lead
|
|
154
|
+
|
|
155
|
+
.cat-lead {
|
|
156
|
+
@include cat-body('xl', 300);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// ----- blockquotes & figures
|
|
160
|
+
|
|
161
|
+
blockquote {
|
|
162
|
+
margin: 0 0 $cat-body-margin-bottom;
|
|
163
|
+
font-style: italic;
|
|
164
|
+
@include cat-body('l');
|
|
165
|
+
color: cat-token('color.ui.font.quote');
|
|
166
|
+
|
|
167
|
+
> :last-child {
|
|
168
|
+
margin-bottom: 0;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
figure {
|
|
173
|
+
margin: 0 0 $cat-body-margin-bottom;
|
|
174
|
+
|
|
175
|
+
figcaption {
|
|
176
|
+
margin-top: -$cat-body-margin-bottom * 0.5;
|
|
177
|
+
margin-bottom: 0;
|
|
178
|
+
@include cat-body('s');
|
|
179
|
+
color: cat-token('color.ui.font.muted');
|
|
180
|
+
|
|
181
|
+
&::before {
|
|
182
|
+
content: '\2014\00A0'; // em dash, nbsp
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// ----- code
|
|
188
|
+
|
|
189
|
+
code,
|
|
190
|
+
samp,
|
|
191
|
+
kbd,
|
|
192
|
+
pre {
|
|
193
|
+
@include cat-mono('m');
|
|
194
|
+
font-weight: cat-token('font.weight.mono');
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
pre {
|
|
198
|
+
margin-top: 0;
|
|
199
|
+
margin-bottom: $cat-body-margin-bottom;
|
|
200
|
+
overflow: auto;
|
|
201
|
+
|
|
202
|
+
code {
|
|
203
|
+
margin: 0;
|
|
204
|
+
padding: 0;
|
|
205
|
+
color: inherit;
|
|
206
|
+
background: none;
|
|
207
|
+
box-shadow: none;
|
|
208
|
+
border-radius: 0;
|
|
209
|
+
word-wrap: normal;
|
|
210
|
+
word-break: normal;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
kbd,
|
|
215
|
+
code {
|
|
216
|
+
margin: 0 0.125rem;
|
|
217
|
+
color: cat-token('color.ui.font.muted');
|
|
218
|
+
background: cat-token('color.ui.background.body');
|
|
219
|
+
box-shadow: 0 0 0 2px cat-token('color.ui.border.default');
|
|
220
|
+
border-radius: cat-border-radius('s');
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
kbd {
|
|
224
|
+
font-size: cat-mono-font-size('s');
|
|
225
|
+
display: inline-block;
|
|
226
|
+
min-width: 1.5rem;
|
|
227
|
+
line-height: cat-body-line-height('m');
|
|
228
|
+
padding: 0 0.375rem;
|
|
229
|
+
text-align: center;
|
|
230
|
+
vertical-align: top;
|
|
231
|
+
white-space: nowrap;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
code {
|
|
235
|
+
@include cat-break-word;
|
|
236
|
+
padding: 0.0625rem 0.25rem;
|
|
237
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use '../variables' as *;
|
|
3
|
+
|
|
4
|
+
@mixin cat-font-azeret($path, $weights...) {
|
|
5
|
+
@if list.index($weights, 400) {
|
|
6
|
+
@font-face {
|
|
7
|
+
font-family: 'Azeret Mono';
|
|
8
|
+
src: url('#{$path}#{cat-token("asset.font.azeretMono.woff2Regular")}') format('woff2');
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
@content;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use '../variables' as *;
|
|
3
|
+
|
|
4
|
+
@mixin cat-font-dm-sans($path, $weights...) {
|
|
5
|
+
@if list.index($weights, 400) {
|
|
6
|
+
@font-face {
|
|
7
|
+
font-family: 'DM Sans';
|
|
8
|
+
src: url('#{$path}#{cat-token("asset.font.dmSans.woff2Regular")}') format('woff2');
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
@content;
|
|
12
|
+
}
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: 'DM Sans';
|
|
15
|
+
src: url('#{$path}#{cat-token("asset.font.dmSans.woff2Italic")}') format('woff2');
|
|
16
|
+
font-style: italic;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
@content;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
@if list.index($weights, 500) {
|
|
22
|
+
@font-face {
|
|
23
|
+
font-family: 'DM Sans';
|
|
24
|
+
src: url('#{$path}#{cat-token("asset.font.dmSans.woff2Medium")}') format('woff2');
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-weight: 500;
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: 'DM Sans';
|
|
31
|
+
src: url('#{$path}#{cat-token("asset.font.dmSans.woff2MediumItalic")}') format('woff2');
|
|
32
|
+
font-style: italic;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
@content;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
@if list.index($weights, 700) {
|
|
38
|
+
@font-face {
|
|
39
|
+
font-family: 'DM Sans';
|
|
40
|
+
src: url('#{$path}#{cat-token("asset.font.dmSans.woff2Bold")}') format('woff2');
|
|
41
|
+
font-style: normal;
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
font-display: swap;
|
|
44
|
+
}
|
|
45
|
+
@font-face {
|
|
46
|
+
font-family: 'DM Sans';
|
|
47
|
+
src: url('#{$path}#{cat-token("asset.font.dmSans.woff2BoldItalic")}') format('woff2');
|
|
48
|
+
font-style: italic;
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
font-display: swap;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use '../variables' as *;
|
|
3
|
+
|
|
4
|
+
@mixin cat-font-lato($path, $weights...) {
|
|
5
|
+
@if list.index($weights, 100) {
|
|
6
|
+
@font-face {
|
|
7
|
+
font-family: Lato;
|
|
8
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Hairline")}') format('woff2'),
|
|
9
|
+
url('#{$path}#{cat-token("asset.font.lato.woffHairline")}') format('woff');
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-weight: 100;
|
|
12
|
+
text-rendering: optimizeLegibility;
|
|
13
|
+
@content;
|
|
14
|
+
}
|
|
15
|
+
@font-face {
|
|
16
|
+
font-family: Lato;
|
|
17
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2HairlineItalic")}') format('woff2'),
|
|
18
|
+
url('#{$path}#{cat-token("asset.font.lato.woffHairlineItalic")}') format('woff');
|
|
19
|
+
font-style: italic;
|
|
20
|
+
font-weight: 100;
|
|
21
|
+
text-rendering: optimizeLegibility;
|
|
22
|
+
@content;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
@if list.index($weights, 200) {
|
|
26
|
+
@font-face {
|
|
27
|
+
font-family: Lato;
|
|
28
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Thin")}') format('woff2'),
|
|
29
|
+
url('#{$path}#{cat-token("asset.font.lato.woffThin")}') format('woff');
|
|
30
|
+
font-style: normal;
|
|
31
|
+
font-weight: 200;
|
|
32
|
+
text-rendering: optimizeLegibility;
|
|
33
|
+
@content;
|
|
34
|
+
}
|
|
35
|
+
@font-face {
|
|
36
|
+
font-family: Lato;
|
|
37
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2ThinItalic")}') format('woff2'),
|
|
38
|
+
url('#{$path}#{cat-token("asset.font.lato.woffThinItalic")}') format('woff');
|
|
39
|
+
font-style: italic;
|
|
40
|
+
font-weight: 200;
|
|
41
|
+
text-rendering: optimizeLegibility;
|
|
42
|
+
@content;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
@if list.index($weights, 300) {
|
|
46
|
+
@font-face {
|
|
47
|
+
font-family: Lato;
|
|
48
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Light")}') format('woff2'),
|
|
49
|
+
url('#{$path}#{cat-token("asset.font.lato.woffLight")}') format('woff');
|
|
50
|
+
font-style: normal;
|
|
51
|
+
font-weight: 300;
|
|
52
|
+
text-rendering: optimizeLegibility;
|
|
53
|
+
@content;
|
|
54
|
+
}
|
|
55
|
+
@font-face {
|
|
56
|
+
font-family: Lato;
|
|
57
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2LightItalic")}') format('woff2'),
|
|
58
|
+
url('#{$path}#{cat-token("asset.font.lato.woffLightItalic")}') format('woff');
|
|
59
|
+
font-style: italic;
|
|
60
|
+
font-weight: 300;
|
|
61
|
+
text-rendering: optimizeLegibility;
|
|
62
|
+
@content;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
@if list.index($weights, 400) {
|
|
66
|
+
@font-face {
|
|
67
|
+
font-family: Lato;
|
|
68
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Regular")}') format('woff2'),
|
|
69
|
+
url('#{$path}#{cat-token("asset.font.lato.woffRegular")}') format('woff');
|
|
70
|
+
font-style: normal;
|
|
71
|
+
font-weight: 400;
|
|
72
|
+
text-rendering: optimizeLegibility;
|
|
73
|
+
@content;
|
|
74
|
+
}
|
|
75
|
+
@font-face {
|
|
76
|
+
font-family: Lato;
|
|
77
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Italic")}') format('woff2'),
|
|
78
|
+
url('#{$path}#{cat-token("asset.font.lato.woffItalic")}') format('woff');
|
|
79
|
+
font-style: italic;
|
|
80
|
+
font-weight: 400;
|
|
81
|
+
text-rendering: optimizeLegibility;
|
|
82
|
+
@content;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
@if list.index($weights, 500) {
|
|
86
|
+
@font-face {
|
|
87
|
+
font-family: Lato;
|
|
88
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Medium")}') format('woff2'),
|
|
89
|
+
url('#{$path}#{cat-token("asset.font.lato.woffMedium")}') format('woff');
|
|
90
|
+
font-style: normal;
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
text-rendering: optimizeLegibility;
|
|
93
|
+
@content;
|
|
94
|
+
}
|
|
95
|
+
@font-face {
|
|
96
|
+
font-family: Lato;
|
|
97
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2MediumItalic")}') format('woff2'),
|
|
98
|
+
url('#{$path}#{cat-token("asset.font.lato.woffMediumItalic")}') format('woff');
|
|
99
|
+
font-style: italic;
|
|
100
|
+
font-weight: 500;
|
|
101
|
+
text-rendering: optimizeLegibility;
|
|
102
|
+
@content;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
@if list.index($weights, 600) {
|
|
106
|
+
@font-face {
|
|
107
|
+
font-family: Lato;
|
|
108
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Semibold")}') format('woff2'),
|
|
109
|
+
url('#{$path}#{cat-token("asset.font.lato.woffSemibold")}') format('woff');
|
|
110
|
+
font-style: normal;
|
|
111
|
+
font-weight: 600;
|
|
112
|
+
text-rendering: optimizeLegibility;
|
|
113
|
+
@content;
|
|
114
|
+
}
|
|
115
|
+
@font-face {
|
|
116
|
+
font-family: Lato;
|
|
117
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2SemiboldItalic")}') format('woff2'),
|
|
118
|
+
url('#{$path}#{cat-token("asset.font.lato.woffSemiboldItalic")}') format('woff');
|
|
119
|
+
font-style: italic;
|
|
120
|
+
font-weight: 600;
|
|
121
|
+
text-rendering: optimizeLegibility;
|
|
122
|
+
@content;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
@if list.index($weights, 700) {
|
|
126
|
+
@font-face {
|
|
127
|
+
font-family: Lato;
|
|
128
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Bold")}') format('woff2'),
|
|
129
|
+
url('#{$path}#{cat-token("asset.font.lato.woffBold")}') format('woff');
|
|
130
|
+
font-style: normal;
|
|
131
|
+
font-weight: 700;
|
|
132
|
+
text-rendering: optimizeLegibility;
|
|
133
|
+
@content;
|
|
134
|
+
}
|
|
135
|
+
@font-face {
|
|
136
|
+
font-family: Lato;
|
|
137
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2BoldItalic")}') format('woff2'),
|
|
138
|
+
url('#{$path}#{cat-token("asset.font.lato.woffBoldItalic")}') format('woff');
|
|
139
|
+
font-style: italic;
|
|
140
|
+
font-weight: 700;
|
|
141
|
+
text-rendering: optimizeLegibility;
|
|
142
|
+
@content;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
@if list.index($weights, 800) {
|
|
146
|
+
@font-face {
|
|
147
|
+
font-family: Lato;
|
|
148
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Heavy")}') format('woff2'),
|
|
149
|
+
url('#{$path}#{cat-token("asset.font.lato.woffHeavy")}') format('woff');
|
|
150
|
+
font-style: normal;
|
|
151
|
+
font-weight: 800;
|
|
152
|
+
text-rendering: optimizeLegibility;
|
|
153
|
+
@content;
|
|
154
|
+
}
|
|
155
|
+
@font-face {
|
|
156
|
+
font-family: Lato;
|
|
157
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2HeavyItalic")}') format('woff2'),
|
|
158
|
+
url('#{$path}#{cat-token("asset.font.lato.woffHeavyItalic")}') format('woff');
|
|
159
|
+
font-style: italic;
|
|
160
|
+
font-weight: 800;
|
|
161
|
+
text-rendering: optimizeLegibility;
|
|
162
|
+
@content;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
@if list.index($weights, 900) {
|
|
166
|
+
@font-face {
|
|
167
|
+
font-family: Lato;
|
|
168
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2Black")}') format('woff2'),
|
|
169
|
+
url('#{$path}#{cat-token("asset.font.lato.woffBlack")}') format('woff');
|
|
170
|
+
font-style: normal;
|
|
171
|
+
font-weight: 900;
|
|
172
|
+
text-rendering: optimizeLegibility;
|
|
173
|
+
@content;
|
|
174
|
+
}
|
|
175
|
+
@font-face {
|
|
176
|
+
font-family: Lato;
|
|
177
|
+
src: url('#{$path}#{cat-token("asset.font.lato.woff2BlackItalic")}') format('woff2'),
|
|
178
|
+
url('#{$path}#{cat-token("asset.font.lato.woffBlackItalic")}') format('woff');
|
|
179
|
+
font-style: italic;
|
|
180
|
+
font-weight: 900;
|
|
181
|
+
text-rendering: optimizeLegibility;
|
|
182
|
+
@content;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@use 'fonts.mixins' as *;
|
|
2
|
+
|
|
3
|
+
@include cat-font-dm-sans('./assets/fonts/', 500) {
|
|
4
|
+
font-display: swap;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@include cat-font-lato('./assets/fonts/', 300, 400, 500, 700) {
|
|
8
|
+
font-display: fallback;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@include cat-font-azeret('./assets/fonts/', 400) {
|
|
12
|
+
font-display: fallback;
|
|
13
|
+
}
|