beathers 5.4.1 → 5.5.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/CHANGELOG +15 -0
- package/css/beathers-icons.min.css +1 -1
- package/css/beathers-icons.min.css.map +1 -1
- package/css/beathers.min.css +2 -2
- package/css/beathers.min.css.map +1 -1
- package/data/colors.d.ts +2 -0
- package/data/colors.d.ts.map +1 -1
- package/data/colors.js +6 -0
- package/package.json +2 -1
- package/public/fonts/beathers.woff +0 -0
- package/scripts/commands/build.d.ts.map +1 -1
- package/scripts/commands/build.js +2 -1
- package/scripts/commands/fonts.d.ts.map +1 -1
- package/scripts/commands/init.d.ts.map +1 -1
- package/scripts/commands/init.js +7 -0
- package/scripts/helpers/BuildScssVariables.d.ts +1 -1
- package/scripts/helpers/BuildScssVariables.d.ts.map +1 -1
- package/scripts/helpers/BuildScssVariables.js +28 -5
- package/scripts/helpers/ReadDefaultValues.d.ts.map +1 -1
- package/scripts/helpers/ReadDefaultValues.js +11 -0
- package/scripts/types.d.ts +22 -3
- package/scripts/types.d.ts.map +1 -1
- package/scss/_variables.scss +1 -0
- package/scss/beathers-icons.min.scss +1 -1
- package/scss/beathers.min.scss +1 -1
- package/scss/functions/_typographic.scss +2 -2
- package/scss/settings/_defaults.scss +23 -1
- package/scss/settings/_index.scss +2 -0
- package/scss/style/_glass.scss +84 -0
- package/scss/style/_resets.scss +6 -4
- package/scss/style/_typographic.scss +3 -2
package/scripts/commands/init.js
CHANGED
|
@@ -31,6 +31,12 @@ async function getDefaultValues() {
|
|
|
31
31
|
'guttersValues',
|
|
32
32
|
'bordersValue',
|
|
33
33
|
'radiuses',
|
|
34
|
+
'glassBlur',
|
|
35
|
+
'glassColor',
|
|
36
|
+
'glassBorderThickness',
|
|
37
|
+
'glassBorder1Color',
|
|
38
|
+
'glassBorder2Color',
|
|
39
|
+
'glassLightAngle',
|
|
34
40
|
'useMediaQueries',
|
|
35
41
|
'useIcons',
|
|
36
42
|
'useFontFamilies',
|
|
@@ -61,6 +67,7 @@ async function getDefaultValues() {
|
|
|
61
67
|
'useBorders',
|
|
62
68
|
'useTextBorders',
|
|
63
69
|
'useRadius',
|
|
70
|
+
'useGlass',
|
|
64
71
|
]));
|
|
65
72
|
}
|
|
66
73
|
export async function Init() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildScssVariables.d.ts","sourceRoot":"","sources":["../../src/scripts/helpers/BuildScssVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"BuildScssVariables.d.ts","sourceRoot":"","sources":["../../src/scripts/helpers/BuildScssVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAwKnC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,GAAE,OAAe,GAAG,MAAM,CAWtF"}
|
|
@@ -15,12 +15,19 @@ function BuildColors(colors) {
|
|
|
15
15
|
scss += '$colors: ();\n';
|
|
16
16
|
return scss;
|
|
17
17
|
}
|
|
18
|
-
function BuildTypography(typography) {
|
|
18
|
+
function BuildTypography(typography, isLocalBuild = false) {
|
|
19
19
|
let scss = '\n\n// --- Typography ---\n';
|
|
20
20
|
scss += '$defaultFontFamilies:';
|
|
21
21
|
scss += typography?.defaultFontFamilies?.length ? typography.defaultFontFamilies.join(', ').replace(/"/g, '') : 'null';
|
|
22
22
|
scss += ';\n';
|
|
23
|
-
|
|
23
|
+
let fontPath = typography?.fontMainPath || null;
|
|
24
|
+
if (fontPath && !isLocalBuild) {
|
|
25
|
+
if (!fontPath.startsWith('/'))
|
|
26
|
+
fontPath = `../../../${fontPath}`;
|
|
27
|
+
else
|
|
28
|
+
fontPath = `../../..${fontPath}`;
|
|
29
|
+
}
|
|
30
|
+
scss += `$fontMainPath: ${fontPath ? `"${fontPath}"` : 'null'};\n`;
|
|
24
31
|
scss += `$fontFormat: ${typography?.fontFormat ? `"${typography.fontFormat}"` : 'null'};\n`;
|
|
25
32
|
scss += '$fontWeights: (';
|
|
26
33
|
scss += typography?.fontWeights?.length ? typography.fontWeights.map((fW) => `"${fW}"`).join(', ') : '';
|
|
@@ -127,12 +134,28 @@ function BuildRoles(roles) {
|
|
|
127
134
|
}
|
|
128
135
|
return scss;
|
|
129
136
|
}
|
|
130
|
-
|
|
131
|
-
|
|
137
|
+
function BuildGlass(glass) {
|
|
138
|
+
if (!glass)
|
|
139
|
+
return '';
|
|
140
|
+
let scss = '\n\n// --- Glass ---\n';
|
|
141
|
+
scss += `$glassBlur: ${glass.blur};\n`;
|
|
142
|
+
scss += `$glassColorLight: ${glass.glassColor?.light};\n`;
|
|
143
|
+
scss += `$glassColorDark: ${glass.glassColor?.dark};\n`;
|
|
144
|
+
scss += `$glassBorderThickness: ${glass.borderThickness};\n`;
|
|
145
|
+
scss += `$glassBorder1ColorLight: ${glass.border1Color?.light};\n`;
|
|
146
|
+
scss += `$glassBorder1ColorDark: ${glass.border1Color?.dark};\n`;
|
|
147
|
+
scss += `$glassBorder2ColorLight: ${glass.border2Color?.light};\n`;
|
|
148
|
+
scss += `$glassBorder2ColorDark: ${glass.border2Color?.dark};\n`;
|
|
149
|
+
scss += `$glassLightAngle: ${glass.lightAngle};\n`;
|
|
150
|
+
return scss;
|
|
151
|
+
}
|
|
152
|
+
export function BuildScssVariables(theme, isLocalBuild = false) {
|
|
153
|
+
const { colors, roles, settings, typography, glass } = theme;
|
|
132
154
|
let scss = '// Generated by Beathers builder\n // Do not edit this file directly\n\n';
|
|
133
155
|
scss += BuildColors(colors);
|
|
134
|
-
scss += BuildTypography(typography);
|
|
156
|
+
scss += BuildTypography(typography, isLocalBuild);
|
|
135
157
|
scss += BuildSettings(settings);
|
|
136
158
|
scss += BuildRoles(roles);
|
|
159
|
+
scss += BuildGlass(glass);
|
|
137
160
|
return scss;
|
|
138
161
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadDefaultValues.d.ts","sourceRoot":"","sources":["../../src/scripts/helpers/ReadDefaultValues.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2C,KAAK,EAAE,MAAM,aAAa,CAAA;AAmF5E,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"ReadDefaultValues.d.ts","sourceRoot":"","sources":["../../src/scripts/helpers/ReadDefaultValues.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2C,KAAK,EAAE,MAAM,aAAa,CAAA;AAmF5E,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CA8GzG"}
|
|
@@ -108,6 +108,8 @@ export async function ReadDefaultValues(files, VariableNames) {
|
|
|
108
108
|
result = buildArray(value);
|
|
109
109
|
else if (['axisDivisions'].includes(name))
|
|
110
110
|
result = cleanNumber(value);
|
|
111
|
+
else if (['glassColor', 'glassBorder1Color', 'glassBorder2Color'].includes(name))
|
|
112
|
+
result = buildColors(value);
|
|
111
113
|
else
|
|
112
114
|
result = cleanString(value);
|
|
113
115
|
variables[name] = result;
|
|
@@ -167,6 +169,15 @@ export async function ReadDefaultValues(files, VariableNames) {
|
|
|
167
169
|
useBorders: variables?.useBorders,
|
|
168
170
|
useTextBorders: variables?.useTextBorders,
|
|
169
171
|
useRadius: variables?.useRadius,
|
|
172
|
+
useGlass: variables?.useGlass,
|
|
173
|
+
};
|
|
174
|
+
theme.glass = {
|
|
175
|
+
blur: variables?.glassBlur,
|
|
176
|
+
glassColor: variables?.glassColor,
|
|
177
|
+
borderThickness: variables?.glassBorderThickness,
|
|
178
|
+
border1Color: variables?.glassBorder1Color,
|
|
179
|
+
border2Color: variables?.glassBorder2Color,
|
|
180
|
+
lightAngle: variables?.glassLightAngle,
|
|
170
181
|
};
|
|
171
182
|
return theme;
|
|
172
183
|
}
|
package/scripts/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** CSS size unit values supporting px, rem, em, viewport units, and percentages */
|
|
2
|
-
type SizeUnit = `${number}px` | `${number}rem` | `${number}em` | `${number}vw` | `${number}vh` | `${number}%`;
|
|
2
|
+
type SizeUnit = 0 | `${number}px` | `${number}rem` | `${number}em` | `${number}vw` | `${number}vh` | `${number}%`;
|
|
3
3
|
/** Color configuration object with optional light and dark theme hex values */
|
|
4
4
|
type ColorType = Record<string, {
|
|
5
5
|
light?: `#${string}`;
|
|
@@ -71,8 +71,25 @@ interface Settings {
|
|
|
71
71
|
/** Gutter values for spacing utilities */
|
|
72
72
|
guttersValues?: Record<'auto' | number, 'auto' | SizeUnit>;
|
|
73
73
|
}
|
|
74
|
+
interface Glass {
|
|
75
|
+
blur?: 0 | `${number}px`;
|
|
76
|
+
glassColor?: {
|
|
77
|
+
light?: `#${string}`;
|
|
78
|
+
dark?: `#${string}`;
|
|
79
|
+
};
|
|
80
|
+
borderThickness?: SizeUnit;
|
|
81
|
+
border1Color?: {
|
|
82
|
+
light?: `#${string}`;
|
|
83
|
+
dark?: `#${string}`;
|
|
84
|
+
};
|
|
85
|
+
border2Color?: {
|
|
86
|
+
light?: `#${string}`;
|
|
87
|
+
dark?: `#${string}`;
|
|
88
|
+
};
|
|
89
|
+
lightAngle?: `${number}deg`;
|
|
90
|
+
}
|
|
74
91
|
/** Available feature keys for enabling/disabling CSS utilities */
|
|
75
|
-
type RoleKeys = 'useMediaQueries' | 'useIcons' | 'useFontFamilies' | 'useFontSizes' | 'useFontShapes' | 'useTextAligns' | 'useTextTruncate' | 'useColors' | 'useColorsOpacities' | 'useColorsLightMode' | 'useColorsDarkMode' | 'useCurrentColors' | 'useRootColors' | 'useGrid' | 'useFlex' | 'useTransitions' | 'useWrappers' | 'useShadows' | 'useDisplays' | 'useOverflows' | 'useOpacities' | 'useBlur' | 'useObjectFits' | 'usePositions' | 'useInsets' | 'useSizes' | 'useGutters' | 'useBorders' | 'useTextBorders' | 'useRadius';
|
|
92
|
+
type RoleKeys = 'useMediaQueries' | 'useIcons' | 'useFontFamilies' | 'useFontSizes' | 'useFontShapes' | 'useTextAligns' | 'useTextTruncate' | 'useColors' | 'useColorsOpacities' | 'useColorsLightMode' | 'useColorsDarkMode' | 'useCurrentColors' | 'useRootColors' | 'useGrid' | 'useFlex' | 'useTransitions' | 'useWrappers' | 'useShadows' | 'useDisplays' | 'useOverflows' | 'useOpacities' | 'useBlur' | 'useObjectFits' | 'usePositions' | 'useInsets' | 'useSizes' | 'useGutters' | 'useBorders' | 'useTextBorders' | 'useRadius' | 'useGlass';
|
|
76
93
|
/** Feature toggles for enabling/disabling CSS utility generation. @default all true */
|
|
77
94
|
type Roles = Partial<Record<RoleKeys, boolean>>;
|
|
78
95
|
/** Main theme configuration object containing all design system settings */
|
|
@@ -85,6 +102,8 @@ interface Theme {
|
|
|
85
102
|
settings?: Settings;
|
|
86
103
|
/** Feature flags for controlling which CSS utilities are generated */
|
|
87
104
|
roles?: Roles;
|
|
105
|
+
/** Optional glassmorphism settings for frosted glass effects */
|
|
106
|
+
glass?: Glass;
|
|
88
107
|
}
|
|
89
|
-
export type { SizeUnit, ColorType, FontWeight, FontStyle, FontVariant, FontType, Typography, Settings, RoleKeys, Roles, Theme, };
|
|
108
|
+
export type { SizeUnit, ColorType, FontWeight, FontStyle, FontVariant, FontType, Typography, Settings, RoleKeys, Glass, Roles, Theme, };
|
|
90
109
|
//# sourceMappingURL=types.d.ts.map
|
package/scripts/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/scripts/types.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,KAAK,QAAQ,GAAG,GAAG,MAAM,IAAI,GAAG,GAAG,MA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gB,GAChB,WAAW,GACX,UAAU,CAAA;AAEd,uFAAuF;AACvF,KAAK,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;AAE/C,4EAA4E;AAC5E,UAAU,KAAK;IACb,8DAA8D;IAC9D,MAAM,CAAC,EAAE,SAAS,CAAA;IAElB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,QAAQ,CAAA;IAEnB,sEAAsE;IACtE,KAAK,CAAC,EAAE,KAAK,CAAA;IAEb,gEAAgE;IAChE,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,YAAY,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,KAAK,EACL,KAAK,GACN,CAAA"}
|
package/scss/_variables.scss
CHANGED
package/scss/beathers.min.scss
CHANGED
|
@@ -44,7 +44,7 @@ $fontMainPath: if(vars.$fontMainPath != null, vars.$fontMainPath, defs.$fontMain
|
|
|
44
44
|
// // unicode-range: U+000-5FF;
|
|
45
45
|
// // }
|
|
46
46
|
//
|
|
47
|
-
@mixin font($title, $weight, $format, $style, $index: 0, $unicode: null, $isLocal: true, $externalUrl: '') {
|
|
47
|
+
@mixin font($key, $title, $weight, $format, $style, $index: 0, $unicode: null, $isLocal: true, $externalUrl: '') {
|
|
48
48
|
// Validate parameters
|
|
49
49
|
$checkedIsLocal: val.boolean($isLocal, '#{$title}.font().local');
|
|
50
50
|
$checkedTitle: val.string($title, '#{$title}.font().title');
|
|
@@ -62,7 +62,7 @@ $fontMainPath: if(vars.$fontMainPath != null, vars.$fontMainPath, defs.$fontMain
|
|
|
62
62
|
$checkedExternalUrl: val.string($externalUrl, 'Typographic.fontFace.externalUrl');
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
$name: if($index == 0, $title, '#{$
|
|
65
|
+
$name: if($index == 0, $title, '#{$key}\:#{$title}');
|
|
66
66
|
$weightValue: map.get(configs.$fontWeightsValues, $weight);
|
|
67
67
|
|
|
68
68
|
@font-face {
|
|
@@ -68,7 +68,7 @@ $colors: (
|
|
|
68
68
|
'info': (
|
|
69
69
|
'light': #0c8181,
|
|
70
70
|
'dark': #49d1d1,
|
|
71
|
-
)
|
|
71
|
+
),
|
|
72
72
|
) !default;
|
|
73
73
|
|
|
74
74
|
// Typography
|
|
@@ -176,3 +176,25 @@ $bordersValue: (1, 2, 3) !default;
|
|
|
176
176
|
|
|
177
177
|
// Defines available border-radius values.
|
|
178
178
|
$radiuses: (5, 10) !default;
|
|
179
|
+
|
|
180
|
+
// Glassmorphism settings
|
|
181
|
+
$glassBlur: 8px !default;
|
|
182
|
+
// Glassmorphism color settings for light and dark modes
|
|
183
|
+
$glassColor: (
|
|
184
|
+
'light': #ffffff,
|
|
185
|
+
'dark': #000000,
|
|
186
|
+
) !default;
|
|
187
|
+
// Glassmorphism border thickness
|
|
188
|
+
$glassBorderThickness: 1px !default;
|
|
189
|
+
// Glassmorphism border 1 settings for light and dark modes
|
|
190
|
+
$glassBorder1Color: (
|
|
191
|
+
'light': #e6e6e6,
|
|
192
|
+
'dark': #303030,
|
|
193
|
+
) !default;
|
|
194
|
+
// Glassmorphism border 2 settings for light and dark modes
|
|
195
|
+
$glassBorder2Color: (
|
|
196
|
+
'light': #e6e6e6,
|
|
197
|
+
'dark': #303030,
|
|
198
|
+
) !default;
|
|
199
|
+
// Glassmorphism light angle
|
|
200
|
+
$glassLightAngle: 45deg !default;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use '../functions/colors' as colors;
|
|
2
|
+
@use '../settings/index' as settings;
|
|
3
|
+
@use '../settings/defaults' as defs;
|
|
4
|
+
@use '../variables' as vars;
|
|
5
|
+
|
|
6
|
+
// Definitions
|
|
7
|
+
$useGlass: if(vars.$useGlass != null, vars.$useGlass, settings.$useGlass);
|
|
8
|
+
$useColorsLightMode: if(vars.$useColorsLightMode != null, vars.$useColorsLightMode, settings.$useColorsLightMode);
|
|
9
|
+
$useColorsDarkMode: if(vars.$useColorsDarkMode != null, vars.$useColorsDarkMode, settings.$useColorsDarkMode);
|
|
10
|
+
$glassBlur: if(vars.$glassBlur != null, vars.$glassBlur, defs.$glassBlur);
|
|
11
|
+
$glassColor: if(vars.$glassColor != null, vars.$glassColor, defs.$glassColor);
|
|
12
|
+
$glassBorderThickness: if(vars.$glassBorderThickness != null, vars.$glassBorderThickness, defs.$glassBorderThickness);
|
|
13
|
+
$border1Color: if(vars.$border1Color != null, vars.$border1Color, defs.$border1Color);
|
|
14
|
+
$border2Color: if(vars.$border2Color != null, vars.$border2Color, defs.$border2Color);
|
|
15
|
+
$glassLightAngle: if(vars.$glassLightAngle != null, vars.$glassLightAngle, defs.$glassLightAngle);
|
|
16
|
+
|
|
17
|
+
@if $useGlass {
|
|
18
|
+
:root {
|
|
19
|
+
--glass-blur: #{$glassBlur};
|
|
20
|
+
--glass-color-light: colors.hexToRgba(map-get($glassColor, 'light'), 0.15, 'Glass.light');
|
|
21
|
+
--glass-color-dark: colors.hexToRgba(map-get($glassColor, 'dark'), 0.15, 'Glass.dark');
|
|
22
|
+
--glass-border-thickness: #{$glassBorderThickness};
|
|
23
|
+
--glass-border-1-color-light: colors.hexToRgba(map-get($border1Color, 'light'), 0.4, 'Glass.light');
|
|
24
|
+
--glass-border-1-color-dark: colors.hexToRgba(map-get($border1Color, 'dark'), 0.4, 'Glass.dark');
|
|
25
|
+
--glass-border-2-color-light: colors.hexToRgba(map-get($border2Color, 'light'), 0.1, 'Glass.light');
|
|
26
|
+
--glass-border-2-color-dark: colors.hexToRgba(map-get($border2Color, 'dark'), 0.1, 'Glass.dark');
|
|
27
|
+
--glass-light-angle: #{$glassLightAngle};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.bg\:glass {
|
|
31
|
+
position: relative;
|
|
32
|
+
isolation: isolate;
|
|
33
|
+
backdrop-filter: blur(var(--glass-blur));
|
|
34
|
+
|
|
35
|
+
&::before {
|
|
36
|
+
content: '';
|
|
37
|
+
position: absolute;
|
|
38
|
+
inset: 0;
|
|
39
|
+
border-radius: inherit;
|
|
40
|
+
border: var(--glass-border-thickness) solid transparent;
|
|
41
|
+
mask:
|
|
42
|
+
linear-gradient(black, black) border-box,
|
|
43
|
+
linear-gradient(black, black) padding-box;
|
|
44
|
+
mask-composite: subtract;
|
|
45
|
+
z-index: -1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@if ($useColorsLightMode) {
|
|
49
|
+
.light &,
|
|
50
|
+
.light\:#{&},
|
|
51
|
+
&.light {
|
|
52
|
+
background: var(--glass-color-light);
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
background: linear-gradient(
|
|
56
|
+
var(--glass-light-angle),
|
|
57
|
+
var(--glass-border-2-color-light),
|
|
58
|
+
var(--glass-border-1-color-light),
|
|
59
|
+
var(--glass-border-2-color-light)
|
|
60
|
+
)
|
|
61
|
+
border-box;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@if ($useColorsDarkMode) {
|
|
67
|
+
.dark &,
|
|
68
|
+
.dark\:#{&},
|
|
69
|
+
&.dark {
|
|
70
|
+
background: var(--glass-color-dark);
|
|
71
|
+
|
|
72
|
+
&::before {
|
|
73
|
+
background: linear-gradient(
|
|
74
|
+
var(--glass-light-angle),
|
|
75
|
+
var(--glass-border-2-color-dark),
|
|
76
|
+
var(--glass-border-1-color-dark),
|
|
77
|
+
var(--glass-border-2-color-dark)
|
|
78
|
+
)
|
|
79
|
+
border-box;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
package/scss/style/_resets.scss
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
@use '../settings/configs' as configs;
|
|
2
|
+
@use '../settings/defaults' as defs;
|
|
2
3
|
@use '../variables' as vars;
|
|
3
4
|
@use '../functions/colors' as colors;
|
|
4
5
|
@use '../settings/index' as settings;
|
|
5
6
|
|
|
6
7
|
// Definitions
|
|
8
|
+
$defaultFontFamilies: if(vars.$defaultFontFamilies != null, vars.$defaultFontFamilies, defs.$defaultFontFamilies);
|
|
7
9
|
$useColors: if(vars.$useColors != null, vars.$useColors, settings.$useColors);
|
|
8
10
|
$useColorsLightMode: if(vars.$useColorsLightMode != null, vars.$useColorsLightMode, settings.$useColorsLightMode);
|
|
9
11
|
$useColorsDarkMode: if(vars.$useColorsDarkMode != null, vars.$useColorsDarkMode, settings.$useColorsDarkMode);
|
|
@@ -15,14 +17,14 @@ html {
|
|
|
15
17
|
|
|
16
18
|
body {
|
|
17
19
|
position: relative;
|
|
18
|
-
|
|
19
|
-
font-family: 'regular';
|
|
20
|
+
font-family: 'regular', $defaultFontFamilies;
|
|
20
21
|
overflow-x: hidden;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
*,
|
|
24
25
|
::before,
|
|
25
26
|
::after {
|
|
27
|
+
font-family: inherit;
|
|
26
28
|
margin: 0;
|
|
27
29
|
padding: 0;
|
|
28
30
|
box-sizing: border-box;
|
|
@@ -51,13 +53,13 @@ a {
|
|
|
51
53
|
@if $useColors {
|
|
52
54
|
@if $useColorsLightMode {
|
|
53
55
|
.light::selection {
|
|
54
|
-
background-color: colors.useColorWithMap('
|
|
56
|
+
background-color: colors.useColorWithMap('third');
|
|
55
57
|
color: colors.useColorWithMap('white');
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
@if $useColorsDarkMode {
|
|
59
61
|
.dark::selection {
|
|
60
|
-
background-color: colors.useColorWithMap('
|
|
62
|
+
background-color: colors.useColorWithMap('third', 'dark');
|
|
61
63
|
color: colors.useColorWithMap('black');
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -112,7 +112,7 @@ $textTruncate: if(vars.$textTruncate != (), vars.$textTruncate, defs.$textTrunca
|
|
|
112
112
|
$checkedUnicode: val.string($unicode, 'Typographic.fontFace.unicode');
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
@include typo.font($title, $weight, $format, $style, $fI, $unicode, $isLocal, $externalUrl);
|
|
115
|
+
@include typo.font($fontKey, $title, $weight, $format, $style, $fI, $unicode, $isLocal, $externalUrl);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -122,7 +122,7 @@ $textTruncate: if(vars.$textTruncate != (), vars.$textTruncate, defs.$textTrunca
|
|
|
122
122
|
@each $style in $styles {
|
|
123
123
|
// Font weights
|
|
124
124
|
// Validate parameters
|
|
125
|
-
$styleClass: if($fI == 0, $weight, '#{$
|
|
125
|
+
$styleClass: if($fI == 0, $weight, '#{$fontKey}\:#{$weight}');
|
|
126
126
|
$weightValue: map.get(configs.$fontWeightsValues, $weight);
|
|
127
127
|
|
|
128
128
|
$mainClass: if($size, #{$size}#{$divider}#{$styleClass}, $styleClass);
|
|
@@ -132,6 +132,7 @@ $textTruncate: if(vars.$textTruncate != (), vars.$textTruncate, defs.$textTrunca
|
|
|
132
132
|
'#{$styleClass}',
|
|
133
133
|
$defaultFontFamilies if($size, !important, null);
|
|
134
134
|
font-weight: if($size, $weightValue !important, $weightValue);
|
|
135
|
+
|
|
135
136
|
@if meta.type-of($styles) == 'list' and list.length($styles) > 0 {
|
|
136
137
|
&.#{$style} {
|
|
137
138
|
font-style: $style;
|