@sit-onyx/vitepress-theme 0.0.1-alpha.0 → 0.1.0-alpha.1
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/package.json +3 -2
- package/src/mixins.scss +26 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sit-onyx/vitepress-theme",
|
|
3
3
|
"description": "VitePress theme that uses the onyx design system",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0-alpha.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Schwarz IT KG",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"src"
|
|
10
10
|
],
|
|
11
11
|
"exports": {
|
|
12
|
-
".": "./src/index.ts"
|
|
12
|
+
".": "./src/index.ts",
|
|
13
|
+
"./mixins.scss": "./src/mixins.scss"
|
|
13
14
|
},
|
|
14
15
|
"homepage": "https://onyx.schwarz/packages/vitepress-theme.html",
|
|
15
16
|
"repository": {
|
package/src/mixins.scss
CHANGED
|
@@ -43,11 +43,35 @@
|
|
|
43
43
|
);
|
|
44
44
|
--vp-home-hero-image-filter: blur(44px);
|
|
45
45
|
|
|
46
|
-
@
|
|
46
|
+
@include breakpoint(min, l) {
|
|
47
47
|
--vp-home-hero-image-filter: blur(68px);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
@
|
|
50
|
+
@include breakpoint(min, s) {
|
|
51
51
|
--vp-home-hero-image-filter: blur(56px);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Applies CSS only to the given VitePress breakpoint.
|
|
57
|
+
* @param {string} $min-max - Whether the breakpoint should be considered as min or max width.
|
|
58
|
+
* @param {string} $name - name of the VitePress breakpoint. One of: xs, s, m, l, xl or xxl
|
|
59
|
+
* @param {number} $offset - optional offset to add to the min/max width. Useful if both min and max are used for the same breakpoint
|
|
60
|
+
*
|
|
61
|
+
* @example breakpoint(min, m)
|
|
62
|
+
* @example breakpoint(max, m)
|
|
63
|
+
*/
|
|
64
|
+
@mixin breakpoint($min-max, $name, $offset: 0) {
|
|
65
|
+
$breakpoints: (
|
|
66
|
+
xs: 375px,
|
|
67
|
+
s: 640px,
|
|
68
|
+
m: 768px,
|
|
69
|
+
l: 960px,
|
|
70
|
+
xl: 1280px,
|
|
71
|
+
xxl: 1440px,
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
@media (#{$min-max}-width: #{map-get($breakpoints, $name) + $offset}) {
|
|
75
|
+
@content;
|
|
76
|
+
}
|
|
77
|
+
}
|