@haiilo/catalyst 0.7.1 → 0.7.4
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/catalyst.css +2 -2
- 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/_toast.scss +77 -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 +17 -0
- package/dist/catalyst/scss/index.scss +34 -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/_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/_toast.scss +77 -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 +17 -0
- package/dist/collection/scss/index.scss +34 -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/_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,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,17 @@
|
|
|
1
|
+
@use 'fonts.mixins.azeret' as *;
|
|
2
|
+
@use 'fonts.mixins.dm' as *;
|
|
3
|
+
@use 'fonts.mixins.lato' as *;
|
|
4
|
+
|
|
5
|
+
@mixin cat-fonts($path) {
|
|
6
|
+
@include cat-font-dm-sans($path, 500) {
|
|
7
|
+
font-display: swap;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@include cat-font-lato($path, 300, 400, 500, 700) {
|
|
11
|
+
font-display: fallback;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@include cat-font-azeret($path, 400) {
|
|
15
|
+
font-display: fallback;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// -- Reset
|
|
2
|
+
|
|
3
|
+
@import '~sanitize.css/sanitize.css';
|
|
4
|
+
@import '~sanitize.css/assets.css';
|
|
5
|
+
@import '~sanitize.css/reduce-motion.css';
|
|
6
|
+
|
|
7
|
+
// -- Vendor
|
|
8
|
+
|
|
9
|
+
@import '~toastify-js/src/toastify.css';
|
|
10
|
+
|
|
11
|
+
// -- Fonts
|
|
12
|
+
|
|
13
|
+
@import 'fonts/fonts.mixins';
|
|
14
|
+
$cat-font-path: 'assets/fonts' !default;
|
|
15
|
+
@include cat-fonts($cat-font-path);
|
|
16
|
+
|
|
17
|
+
// -- Core
|
|
18
|
+
|
|
19
|
+
@import 'core/base';
|
|
20
|
+
@import 'core/nav';
|
|
21
|
+
@import 'core/toast';
|
|
22
|
+
@import 'core/typography';
|
|
23
|
+
|
|
24
|
+
// -- Utils
|
|
25
|
+
|
|
26
|
+
@import 'utils/color';
|
|
27
|
+
@import 'utils/display';
|
|
28
|
+
@import 'utils/elevation';
|
|
29
|
+
@import 'utils/layout';
|
|
30
|
+
@import 'utils/sizing';
|
|
31
|
+
@import 'utils/spacing';
|
|
32
|
+
@import 'utils/typography';
|
|
33
|
+
@import 'utils/visibility';
|
|
34
|
+
@import 'utils/ratio';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
|
|
3
|
+
@each $name, $theme in cat-token('color.theme') {
|
|
4
|
+
.cat-bg-#{$name} {
|
|
5
|
+
background-color: cat-token('color.theme.#{$name}.bg') !important;
|
|
6
|
+
color: cat-token('color.theme.#{$name}.fill') !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cat-bg-#{$name}-hover {
|
|
10
|
+
transition: background-color cat-token('time.transition.s'), color cat-token('time.transition.s');
|
|
11
|
+
|
|
12
|
+
&:hover {
|
|
13
|
+
background-color: cat-token('color.theme.#{$name}.bgHover') !important;
|
|
14
|
+
color: cat-token('color.theme.#{$name}.fillHover') !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.cat-text-#{$name},
|
|
19
|
+
.cat-link-#{$name} {
|
|
20
|
+
color: cat-token('color.theme.#{$name}.text') !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cat-link-#{$name},
|
|
24
|
+
.cat-text-#{$name}-hover {
|
|
25
|
+
transition: color cat-token('time.transition.s');
|
|
26
|
+
|
|
27
|
+
&:hover {
|
|
28
|
+
color: cat-token('color.theme.#{$name}.textHover') !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:active {
|
|
32
|
+
color: cat-token('color.theme.#{$name}.textActive') !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.cat-active {
|
|
38
|
+
color: cat-token('color.theme.primary.text') !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.cat-muted {
|
|
42
|
+
color: cat-token('color.ui.font.muted') !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.cat-text-reset {
|
|
46
|
+
color: inherit !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.cat-link-reset {
|
|
50
|
+
color: inherit !important;
|
|
51
|
+
text-decoration: inherit !important;
|
|
52
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
@use 'media.mixins' as *;
|
|
3
|
+
|
|
4
|
+
$-display-props: none, inline, inline-block, block, grid, flex, inline-flex;
|
|
5
|
+
|
|
6
|
+
@each $prop in $-display-props {
|
|
7
|
+
.cat-#{$prop} {
|
|
8
|
+
display: $prop !important;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@each $key, $value in cat-token('size.screen') {
|
|
13
|
+
@include from($key) {
|
|
14
|
+
@each $prop in $-display-props {
|
|
15
|
+
.cat-#{$prop}\:#{$key} {
|
|
16
|
+
display: $prop !important;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
@use 'elevation.mixins' as *;
|
|
3
|
+
|
|
4
|
+
.cat-elevation-transition {
|
|
5
|
+
@include cat-elevation-transition;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@each $level, $_def in $cat-elevation {
|
|
9
|
+
.cat-elevation-#{$level} {
|
|
10
|
+
@include cat-elevation($level);
|
|
11
|
+
}
|
|
12
|
+
.cat-elevation-hover-#{$level} {
|
|
13
|
+
&:hover,
|
|
14
|
+
&:focus,
|
|
15
|
+
&:focus-within {
|
|
16
|
+
@include cat-elevation($level);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
|
|
3
|
+
@mixin -layout-property($name, $property, $value) {
|
|
4
|
+
.cat-#{$name} {
|
|
5
|
+
#{$property}: #{$value};
|
|
6
|
+
@content;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// -- Direction
|
|
11
|
+
|
|
12
|
+
@include -layout-property('flex-row', 'flex-direction', 'row');
|
|
13
|
+
@include -layout-property('flex-col', 'flex-direction', 'column');
|
|
14
|
+
|
|
15
|
+
// -- Flex
|
|
16
|
+
|
|
17
|
+
@include -layout-property('flex-1', 'flex', '1 1 0%');
|
|
18
|
+
@include -layout-property('flex-auto', 'flex', '1 1 auto');
|
|
19
|
+
@include -layout-property('flex-init', 'flex', '0 1 auto');
|
|
20
|
+
@include -layout-property('flex-none', 'flex', 'none');
|
|
21
|
+
|
|
22
|
+
// -- Wrap
|
|
23
|
+
|
|
24
|
+
@include -layout-property('flex-wrap', 'flex-wrap', 'wrap');
|
|
25
|
+
@include -layout-property('flex-nowrap', 'flex-wrap', 'nowrap');
|
|
26
|
+
|
|
27
|
+
// -- Gap
|
|
28
|
+
|
|
29
|
+
@each $size, $value in cat-token('size.spacing') {
|
|
30
|
+
@include -layout-property('gap-#{$size}', 'gap', $value);
|
|
31
|
+
@include -layout-property('gap-x-#{$size}', 'column-gap', $value);
|
|
32
|
+
@include -layout-property('gap-y-#{$size}', 'row-gap', $value);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// -- Alignment
|
|
36
|
+
|
|
37
|
+
@include -layout-property('justify-start', 'justify-content', 'flex-start');
|
|
38
|
+
@include -layout-property('justify-end', 'justify-content', 'flex-end');
|
|
39
|
+
@include -layout-property('justify-center', 'justify-content', 'center');
|
|
40
|
+
@include -layout-property('justify-between', 'justify-content', 'space-between');
|
|
41
|
+
// @include -layout-property('justify-around', 'justify-content', 'space-around');
|
|
42
|
+
// @include -layout-property('justify-evenly', 'justify-content', 'space-evenly');
|
|
43
|
+
|
|
44
|
+
@include -layout-property('justify-items-start', 'justify-items', 'flex-start');
|
|
45
|
+
@include -layout-property('justify-items-end', 'justify-items', 'flex-end');
|
|
46
|
+
@include -layout-property('justify-items-center', 'justify-items', 'flex-center');
|
|
47
|
+
@include -layout-property('justify-items-stretch', 'justify-items', 'flex-stretch');
|
|
48
|
+
|
|
49
|
+
@include -layout-property('content-start', 'align-content', 'flex-start');
|
|
50
|
+
@include -layout-property('content-end', 'align-content', 'flex-end');
|
|
51
|
+
@include -layout-property('content-center', 'align-content', 'center');
|
|
52
|
+
@include -layout-property('content-between', 'align-content', 'space-between');
|
|
53
|
+
// @include -layout-property('content-around', 'align-content', 'space-around');
|
|
54
|
+
// @include -layout-property('content-evenly', 'align-content', 'space-evenly');
|
|
55
|
+
|
|
56
|
+
@include -layout-property('items-start', 'align-items', 'flex-start');
|
|
57
|
+
@include -layout-property('items-end', 'align-items', 'flex-end');
|
|
58
|
+
@include -layout-property('items-center', 'align-items', 'flex-center');
|
|
59
|
+
@include -layout-property('items-stretch', 'align-items', 'flex-stretch');
|
|
60
|
+
|
|
61
|
+
// -- Grid
|
|
62
|
+
|
|
63
|
+
@for $i from 1 through 12 {
|
|
64
|
+
@include -layout-property('grid-#{$i}', 'grid-template-columns', 'repeat(#{$i}, minmax(0, 1fr))');
|
|
65
|
+
@include -layout-property('grid-col-#{$i}', 'grid-column', 'span #{$i} / span #{$i}');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@for $i from 1 through 6 {
|
|
69
|
+
@include -layout-property('grid-row-#{$i}', 'grid-row', 'span #{$i} / span #{$i}');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@include -layout-property(
|
|
73
|
+
'grid-auto',
|
|
74
|
+
'grid-template-columns',
|
|
75
|
+
'repeat(auto-fill,minmax(min(var(--grid-min),100%),1fr))'
|
|
76
|
+
) {
|
|
77
|
+
--grid-min: 100%;
|
|
78
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
|
|
3
|
+
// ---- Responsive
|
|
4
|
+
|
|
5
|
+
@mixin until($size, $media-type: screen) {
|
|
6
|
+
@media #{$media-type} and (max-width: #{cat-token('size.screen.#{$size}') - 1px}) {
|
|
7
|
+
@content;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin from($size, $media-type: screen) {
|
|
12
|
+
@media #{$media-type} and (min-width: #{cat-token('size.screen.#{$size}')}) {
|
|
13
|
+
@content;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// ---- Print
|
|
18
|
+
|
|
19
|
+
@mixin print {
|
|
20
|
+
@media print {
|
|
21
|
+
@content;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// ---- Interaction
|
|
26
|
+
|
|
27
|
+
@mixin pointer($pointer: fine) {
|
|
28
|
+
@media (pointer: #{$pointer}) {
|
|
29
|
+
@content;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@mixin hover($hover: hover) {
|
|
34
|
+
@media (hover: #{$hover}) {
|
|
35
|
+
@content;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@use 'ratio.mixins' as *;
|
|
2
|
+
|
|
3
|
+
$aspect-ratios: (
|
|
4
|
+
'1x1': 1,
|
|
5
|
+
'3x1': 3,
|
|
6
|
+
'6x1': 6,
|
|
7
|
+
'4x3': calc(4 / 3),
|
|
8
|
+
'16x9': calc(16 / 9),
|
|
9
|
+
'21x9': calc(21 / 9)
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
.cat-ratio {
|
|
13
|
+
@include cat-ratio(var(--cat-aspect-ratio));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@each $key, $ratio in $aspect-ratios {
|
|
17
|
+
.cat-ratio-#{$key} {
|
|
18
|
+
--cat-aspect-ratio: #{$ratio};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
|
|
3
|
+
@function cat-size($size) {
|
|
4
|
+
@return cat-token('size.base.#{$size}');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@function cat-border-radius($size) {
|
|
8
|
+
@if $size == '0' or $size == 0 {
|
|
9
|
+
@return none;
|
|
10
|
+
} @else if $size == 'full' {
|
|
11
|
+
@return 100rem;
|
|
12
|
+
} @else {
|
|
13
|
+
@return cat-token('size.border.radius.#{$size}');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
@use 'sizing.mixins' as *;
|
|
3
|
+
|
|
4
|
+
@each $size, $_def in cat-token('size.border.radius') {
|
|
5
|
+
.cat-radius-#{$size} {
|
|
6
|
+
border-radius: cat-border-radius($size);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.cat-radius-0 {
|
|
11
|
+
border-radius: cat-border-radius('0');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.cat-radius-full {
|
|
15
|
+
border-radius: cat-border-radius('full');
|
|
16
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../variables' as *;
|
|
3
|
+
@use 'spacing.mixins' as *;
|
|
4
|
+
|
|
5
|
+
$-spacings: map.merge(
|
|
6
|
+
(
|
|
7
|
+
'auto': auto,
|
|
8
|
+
'0': 0
|
|
9
|
+
),
|
|
10
|
+
cat-token('size.spacing')
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
@each $name, $spacing in $-spacings {
|
|
14
|
+
.cat-m-#{$name} {
|
|
15
|
+
margin: $spacing !important;
|
|
16
|
+
}
|
|
17
|
+
.cat-mv-#{$name} {
|
|
18
|
+
margin-top: $spacing !important;
|
|
19
|
+
margin-bottom: $spacing !important;
|
|
20
|
+
}
|
|
21
|
+
.cat-mh-#{$name} {
|
|
22
|
+
margin-left: $spacing !important;
|
|
23
|
+
margin-right: $spacing !important;
|
|
24
|
+
}
|
|
25
|
+
@each $dir in (top, bottom, left, right) {
|
|
26
|
+
.cat-m#{str-slice($dir, 0, 1)}-#{$name} {
|
|
27
|
+
margin-#{$dir}: $spacing !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@if $spacing != auto {
|
|
32
|
+
.cat-p-#{$name} {
|
|
33
|
+
padding: $spacing !important;
|
|
34
|
+
}
|
|
35
|
+
.cat-pv-#{$name} {
|
|
36
|
+
padding-top: $spacing !important;
|
|
37
|
+
padding-bottom: $spacing !important;
|
|
38
|
+
}
|
|
39
|
+
.cat-ph-#{$name} {
|
|
40
|
+
padding-left: $spacing !important;
|
|
41
|
+
padding-right: $spacing !important;
|
|
42
|
+
}
|
|
43
|
+
@each $dir in (top, bottom, left, right) {
|
|
44
|
+
.cat-p#{str-slice($dir, 0, 1)}-#{$name} {
|
|
45
|
+
padding-#{$dir}: $spacing !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|