@mastors/core 1.1.0 → 2.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/README.md +12 -121
- package/dist/mastors-core.css +62 -1615
- package/dist/mastors-core.css.map +1 -1
- package/package.json +6 -8
- package/scss/abstracts/_maps.scss +9 -0
- package/scss/accessibility/_index.scss +0 -1
- package/scss/accessibility/_screen-reader.scss +1 -4
- package/scss/api/_index.scss +0 -1
- package/scss/base/_reset.scss +1 -1
- package/scss/config/_flags.scss +9 -9
- package/scss/functions/_color.scss +15 -32
- package/scss/functions/_em.scss +2 -2
- package/scss/functions/_index.scss +0 -6
- package/scss/functions/_math.scss +0 -19
- package/scss/functions/_string.scss +0 -35
- package/scss/generators/_class-generator.scss +42 -31
- package/scss/generators/_responsive-generator.scss +4 -0
- package/scss/helpers/_visually-hidden.scss +14 -27
- package/scss/mixins/_breakpoint.scss +3 -3
- package/scss/mixins/_transition.scss +1 -1
- package/scss/responsive/_engine.scss +5 -3
- package/scss/responsive/_fluid-type.scss +9 -8
- package/scss/semantic/_colors.scss +15 -15
- package/scss/semantic/_spacing.scss +5 -5
- package/scss/semantic/_typography.scss +5 -5
- package/scss/themes/_base-theme.scss +5 -0
- package/scss/themes/_dark.scss +7 -8
- package/scss/tokens/_color.scss +4 -8
- package/scss/tokens/_shadows.scss +9 -7
- package/scss/tokens/_sizing.scss +6 -3
- package/scss/tokens/_typography.scss +10 -9
- package/scss/utilities/_borders.scss +6 -4
- package/scss/utilities/_colors.scss +1 -1
- package/scss/utilities/_index.scss +0 -4
- package/scss/utilities/_sizing.scss +2 -2
- package/scss/variables/_global.scss +4 -4
- package/scss/variables/_grid.scss +3 -3
- package/scss/vendors/_index.scss +2 -0
- package/src/index.ts +11 -0
- package/src/tokens.ts +314 -0
- package/src/types.ts +52 -0
- package/postinstall.js +0 -41
- package/scripts/generate-tokens.js +0 -259
- package/scss/accessibility/_print.scss +0 -52
- package/scss/config/_index.scss +0 -12
- package/scss/functions/_vars.scss +0 -49
- package/scss/utilities/_animation.scss +0 -125
- package/scss/utilities/_interaction.scss +0 -156
- package/scss/utilities/_layout.scss +0 -162
- package/scss/utilities/_typography.scss +0 -163
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
// utilities/_layout.scss
|
|
2
|
-
// Layout utilities — aspect-ratio, object-fit, object-position, float, clear,
|
|
3
|
-
// isolation, mix-blend-mode, box-decoration, appearance.
|
|
4
|
-
// ─────────────────────────────────────────────────────────────
|
|
5
|
-
|
|
6
|
-
@use "../generators/class-generator" as gen;
|
|
7
|
-
|
|
8
|
-
// ── Aspect ratio ──────────────────────────────────────────────────────────────
|
|
9
|
-
// Use calc() for ratio values — bare slash division is deprecated in Sass 2+.
|
|
10
|
-
$-aspect-ratios: (
|
|
11
|
-
"auto": auto,
|
|
12
|
-
"square": calc(1 / 1),
|
|
13
|
-
"video": calc(16 / 9),
|
|
14
|
-
"4-3": calc(4 / 3),
|
|
15
|
-
"3-2": calc(3 / 2),
|
|
16
|
-
"21-9": calc(21 / 9),
|
|
17
|
-
"9-16": calc(9 / 16),
|
|
18
|
-
"golden": 1.618,
|
|
19
|
-
) !default;
|
|
20
|
-
|
|
21
|
-
@each $key, $value in $-aspect-ratios {
|
|
22
|
-
.aspect-#{$key} { aspect-ratio: $value; }
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// ── Object fit ───────────────────────────────────────────────────────────────
|
|
26
|
-
|
|
27
|
-
@include gen.generate-utilities((
|
|
28
|
-
"object-fit": (
|
|
29
|
-
property: object-fit,
|
|
30
|
-
prefix: "object",
|
|
31
|
-
values: (
|
|
32
|
-
"contain": contain,
|
|
33
|
-
"cover": cover,
|
|
34
|
-
"fill": fill,
|
|
35
|
-
"none": none,
|
|
36
|
-
"scale-down": scale-down,
|
|
37
|
-
),
|
|
38
|
-
),
|
|
39
|
-
));
|
|
40
|
-
|
|
41
|
-
// ── Object position ──────────────────────────────────────────────────────────
|
|
42
|
-
|
|
43
|
-
@include gen.generate-utilities((
|
|
44
|
-
"object-position": (
|
|
45
|
-
property: object-position,
|
|
46
|
-
prefix: "object",
|
|
47
|
-
values: (
|
|
48
|
-
"bottom": bottom,
|
|
49
|
-
"center": center,
|
|
50
|
-
"left": left,
|
|
51
|
-
"left-bottom": left bottom,
|
|
52
|
-
"left-top": left top,
|
|
53
|
-
"right": right,
|
|
54
|
-
"right-bottom": right bottom,
|
|
55
|
-
"right-top": right top,
|
|
56
|
-
"top": top,
|
|
57
|
-
),
|
|
58
|
-
),
|
|
59
|
-
));
|
|
60
|
-
|
|
61
|
-
// ── Float ─────────────────────────────────────────────────────────────────────
|
|
62
|
-
|
|
63
|
-
@include gen.generate-utilities((
|
|
64
|
-
"float": (
|
|
65
|
-
property: float,
|
|
66
|
-
prefix: "float",
|
|
67
|
-
values: (
|
|
68
|
-
"right": right,
|
|
69
|
-
"left": left,
|
|
70
|
-
"none": none,
|
|
71
|
-
"start": inline-start,
|
|
72
|
-
"end": inline-end,
|
|
73
|
-
),
|
|
74
|
-
responsive: true,
|
|
75
|
-
),
|
|
76
|
-
));
|
|
77
|
-
|
|
78
|
-
// ── Clear ─────────────────────────────────────────────────────────────────────
|
|
79
|
-
|
|
80
|
-
@include gen.generate-utilities((
|
|
81
|
-
"clear": (
|
|
82
|
-
property: clear,
|
|
83
|
-
prefix: "clear",
|
|
84
|
-
values: (
|
|
85
|
-
"left": left,
|
|
86
|
-
"right": right,
|
|
87
|
-
"both": both,
|
|
88
|
-
"none": none,
|
|
89
|
-
"start": inline-start,
|
|
90
|
-
"end": inline-end,
|
|
91
|
-
),
|
|
92
|
-
),
|
|
93
|
-
));
|
|
94
|
-
|
|
95
|
-
// ── Isolation ─────────────────────────────────────────────────────────────────
|
|
96
|
-
|
|
97
|
-
.isolate { isolation: isolate; }
|
|
98
|
-
.isolation-auto { isolation: auto; }
|
|
99
|
-
|
|
100
|
-
// ── Mix blend mode ────────────────────────────────────────────────────────────
|
|
101
|
-
|
|
102
|
-
@include gen.generate-utilities((
|
|
103
|
-
"mix-blend": (
|
|
104
|
-
property: mix-blend-mode,
|
|
105
|
-
prefix: "mix-blend",
|
|
106
|
-
values: (
|
|
107
|
-
"normal": normal,
|
|
108
|
-
"multiply": multiply,
|
|
109
|
-
"screen": screen,
|
|
110
|
-
"overlay": overlay,
|
|
111
|
-
"darken": darken,
|
|
112
|
-
"lighten": lighten,
|
|
113
|
-
"hard-light": hard-light,
|
|
114
|
-
"soft-light": soft-light,
|
|
115
|
-
"difference": difference,
|
|
116
|
-
"exclusion": exclusion,
|
|
117
|
-
"hue": hue,
|
|
118
|
-
"saturation": saturation,
|
|
119
|
-
"color": color,
|
|
120
|
-
"luminosity": luminosity,
|
|
121
|
-
"plus-lighter": plus-lighter,
|
|
122
|
-
),
|
|
123
|
-
),
|
|
124
|
-
));
|
|
125
|
-
|
|
126
|
-
// ── Background blend mode ─────────────────────────────────────────────────────
|
|
127
|
-
|
|
128
|
-
@include gen.generate-utilities((
|
|
129
|
-
"bg-blend": (
|
|
130
|
-
property: background-blend-mode,
|
|
131
|
-
prefix: "bg-blend",
|
|
132
|
-
values: (
|
|
133
|
-
"normal": normal,
|
|
134
|
-
"multiply": multiply,
|
|
135
|
-
"screen": screen,
|
|
136
|
-
"overlay": overlay,
|
|
137
|
-
"darken": darken,
|
|
138
|
-
"lighten": lighten,
|
|
139
|
-
"difference": difference,
|
|
140
|
-
"exclusion": exclusion,
|
|
141
|
-
"color": color,
|
|
142
|
-
"luminosity": luminosity,
|
|
143
|
-
),
|
|
144
|
-
),
|
|
145
|
-
));
|
|
146
|
-
|
|
147
|
-
// ── Box decoration break ──────────────────────────────────────────────────────
|
|
148
|
-
|
|
149
|
-
.box-decoration-clone { box-decoration-break: clone; }
|
|
150
|
-
.box-decoration-slice { box-decoration-break: slice; }
|
|
151
|
-
|
|
152
|
-
// ── Appearance ───────────────────────────────────────────────────────────────
|
|
153
|
-
|
|
154
|
-
.appearance-none { appearance: none; }
|
|
155
|
-
.appearance-auto { appearance: auto; }
|
|
156
|
-
|
|
157
|
-
// ── Will-change ──────────────────────────────────────────────────────────────
|
|
158
|
-
|
|
159
|
-
.will-change-auto { will-change: auto; }
|
|
160
|
-
.will-change-scroll { will-change: scroll-position; }
|
|
161
|
-
.will-change-contents { will-change: contents; }
|
|
162
|
-
.will-change-transform { will-change: transform; }
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
// utilities/_typography.scss
|
|
2
|
-
// Typography utility classes — text-align, size, weight, leading, tracking,
|
|
3
|
-
// decoration, transform, whitespace, overflow, font-family, font-style.
|
|
4
|
-
// ─────────────────────────────────────────────────────────────
|
|
5
|
-
|
|
6
|
-
@use "sass:map";
|
|
7
|
-
@use "../tokens/typography" as ty;
|
|
8
|
-
@use "../generators/class-generator" as gen;
|
|
9
|
-
|
|
10
|
-
// ── Text align ───────────────────────────────────────────────────────────────
|
|
11
|
-
|
|
12
|
-
@include gen.generate-utilities((
|
|
13
|
-
"text-align": (
|
|
14
|
-
property: text-align,
|
|
15
|
-
prefix: "text",
|
|
16
|
-
values: (
|
|
17
|
-
"left": left,
|
|
18
|
-
"center": center,
|
|
19
|
-
"right": right,
|
|
20
|
-
"justify": justify,
|
|
21
|
-
"start": start,
|
|
22
|
-
"end": end,
|
|
23
|
-
),
|
|
24
|
-
responsive: true,
|
|
25
|
-
),
|
|
26
|
-
));
|
|
27
|
-
|
|
28
|
-
// ── Font size ────────────────────────────────────────────────────────────────
|
|
29
|
-
|
|
30
|
-
@each $key, $val in ty.$font-size-tokens {
|
|
31
|
-
.text-#{$key} { font-size: $val; }
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// ── Font weight ──────────────────────────────────────────────────────────────
|
|
35
|
-
|
|
36
|
-
@each $key, $val in ty.$font-weight-tokens {
|
|
37
|
-
.font-#{$key} { font-weight: $val; }
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// ── Font family ──────────────────────────────────────────────────────────────
|
|
41
|
-
|
|
42
|
-
@each $key, $val in ty.$font-family-tokens {
|
|
43
|
-
.font-#{$key} { font-family: $val; }
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// ── Font style ───────────────────────────────────────────────────────────────
|
|
47
|
-
|
|
48
|
-
.italic { font-style: italic; }
|
|
49
|
-
.not-italic { font-style: normal; }
|
|
50
|
-
|
|
51
|
-
// ── Line height (leading) ────────────────────────────────────────────────────
|
|
52
|
-
|
|
53
|
-
@each $key, $val in ty.$line-height-tokens {
|
|
54
|
-
.leading-#{$key} { line-height: $val; }
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// ── Letter spacing (tracking) ────────────────────────────────────────────────
|
|
58
|
-
|
|
59
|
-
@each $key, $val in ty.$letter-spacing-tokens {
|
|
60
|
-
.tracking-#{$key} { letter-spacing: $val; }
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// ── Text decoration ──────────────────────────────────────────────────────────
|
|
64
|
-
|
|
65
|
-
.underline { text-decoration-line: underline; }
|
|
66
|
-
.overline { text-decoration-line: overline; }
|
|
67
|
-
.line-through { text-decoration-line: line-through; }
|
|
68
|
-
.no-underline { text-decoration-line: none; }
|
|
69
|
-
|
|
70
|
-
// Decoration style
|
|
71
|
-
.decoration-solid { text-decoration-style: solid; }
|
|
72
|
-
.decoration-dashed { text-decoration-style: dashed; }
|
|
73
|
-
.decoration-dotted { text-decoration-style: dotted; }
|
|
74
|
-
.decoration-double { text-decoration-style: double; }
|
|
75
|
-
.decoration-wavy { text-decoration-style: wavy; }
|
|
76
|
-
|
|
77
|
-
// Decoration thickness
|
|
78
|
-
.decoration-auto { text-decoration-thickness: auto; }
|
|
79
|
-
.decoration-1 { text-decoration-thickness: 1px; }
|
|
80
|
-
.decoration-2 { text-decoration-thickness: 2px; }
|
|
81
|
-
.decoration-4 { text-decoration-thickness: 4px; }
|
|
82
|
-
.decoration-8 { text-decoration-thickness: 8px; }
|
|
83
|
-
|
|
84
|
-
// ── Text transform ───────────────────────────────────────────────────────────
|
|
85
|
-
|
|
86
|
-
.uppercase { text-transform: uppercase; }
|
|
87
|
-
.lowercase { text-transform: lowercase; }
|
|
88
|
-
.capitalize { text-transform: capitalize; }
|
|
89
|
-
.normal-case { text-transform: none; }
|
|
90
|
-
|
|
91
|
-
// ── Text overflow ────────────────────────────────────────────────────────────
|
|
92
|
-
|
|
93
|
-
.text-ellipsis { text-overflow: ellipsis; }
|
|
94
|
-
.text-clip { text-overflow: clip; }
|
|
95
|
-
|
|
96
|
-
// ── Whitespace ───────────────────────────────────────────────────────────────
|
|
97
|
-
|
|
98
|
-
@include gen.generate-utilities((
|
|
99
|
-
"whitespace": (
|
|
100
|
-
property: white-space,
|
|
101
|
-
prefix: "whitespace",
|
|
102
|
-
values: (
|
|
103
|
-
"normal": normal,
|
|
104
|
-
"nowrap": nowrap,
|
|
105
|
-
"pre": pre,
|
|
106
|
-
"pre-line": pre-line,
|
|
107
|
-
"pre-wrap": pre-wrap,
|
|
108
|
-
"break-spaces": break-spaces,
|
|
109
|
-
),
|
|
110
|
-
),
|
|
111
|
-
));
|
|
112
|
-
|
|
113
|
-
// ── Word break ───────────────────────────────────────────────────────────────
|
|
114
|
-
|
|
115
|
-
.break-normal { overflow-wrap: normal; word-break: normal; }
|
|
116
|
-
.break-words { overflow-wrap: break-word; }
|
|
117
|
-
.break-all { word-break: break-all; }
|
|
118
|
-
.break-keep { word-break: keep-all; }
|
|
119
|
-
|
|
120
|
-
// ── Text indent ──────────────────────────────────────────────────────────────
|
|
121
|
-
|
|
122
|
-
.indent-0 { text-indent: 0; }
|
|
123
|
-
.indent-4 { text-indent: 1rem; }
|
|
124
|
-
.indent-8 { text-indent: 2rem; }
|
|
125
|
-
|
|
126
|
-
// ── Vertical align ───────────────────────────────────────────────────────────
|
|
127
|
-
|
|
128
|
-
@include gen.generate-utilities((
|
|
129
|
-
"align": (
|
|
130
|
-
property: vertical-align,
|
|
131
|
-
prefix: "align",
|
|
132
|
-
values: (
|
|
133
|
-
"baseline": baseline,
|
|
134
|
-
"top": top,
|
|
135
|
-
"middle": middle,
|
|
136
|
-
"bottom": bottom,
|
|
137
|
-
"text-top": text-top,
|
|
138
|
-
"text-bottom": text-bottom,
|
|
139
|
-
"sub": sub,
|
|
140
|
-
"super": super,
|
|
141
|
-
),
|
|
142
|
-
),
|
|
143
|
-
));
|
|
144
|
-
|
|
145
|
-
// ── List style ───────────────────────────────────────────────────────────────
|
|
146
|
-
|
|
147
|
-
.list-none { list-style-type: none; }
|
|
148
|
-
.list-disc { list-style-type: disc; }
|
|
149
|
-
.list-decimal { list-style-type: decimal; }
|
|
150
|
-
.list-inside { list-style-position: inside; }
|
|
151
|
-
.list-outside { list-style-position: outside; }
|
|
152
|
-
|
|
153
|
-
// ── Smooth font rendering ────────────────────────────────────────────────────
|
|
154
|
-
|
|
155
|
-
.antialiased {
|
|
156
|
-
-webkit-font-smoothing: antialiased;
|
|
157
|
-
-moz-osx-font-smoothing: grayscale;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.subpixel-antialiased {
|
|
161
|
-
-webkit-font-smoothing: auto;
|
|
162
|
-
-moz-osx-font-smoothing: auto;
|
|
163
|
-
}
|