@guebbit/css-toolkit 1.3.1 → 1.3.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/docs/.vitepress/dist/404.html +1 -1
- package/docs/.vitepress/dist/assets/{app.CE7x4Dlp.js → app.CBPosL5d.js} +1 -1
- package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.C6BRpH9I.js +1 -0
- package/docs/.vitepress/dist/assets/chunks/{VPLocalSearchBox.TmXlq6CT.js → VPLocalSearchBox.gSyUO2Y7.js} +1 -1
- package/docs/.vitepress/dist/assets/chunks/{theme.BWSHCtHe.js → theme.BeEqdqye.js} +2 -2
- package/docs/.vitepress/dist/colors/bootstrap.html +2 -2
- package/docs/.vitepress/dist/colors/brands.html +2 -2
- package/docs/.vitepress/dist/colors/customs.html +2 -2
- package/docs/.vitepress/dist/functions/colors.html +2 -2
- package/docs/.vitepress/dist/functions/helpers.html +2 -2
- package/docs/.vitepress/dist/functions/strings.html +2 -2
- package/docs/.vitepress/dist/index.html +2 -2
- package/docs/.vitepress/dist/mixins/build-aspect-ratio.html +2 -2
- package/docs/.vitepress/dist/mixins/build-compatibility.html +2 -2
- package/docs/.vitepress/dist/mixins/build-scrollbar.html +2 -2
- package/docs/.vitepress/dist/mixins/create-colors.html +2 -2
- package/docs/.vitepress/dist/mixins/create-helper-margin.html +2 -2
- package/docs/.vitepress/dist/mixins/create-helper-padding.html +2 -2
- package/docs/.vitepress/dist/mixins/create-instruction.html +2 -2
- package/package.json +5 -5
- package/src/mixins/_create-colors-vars.scss +11 -19
- package/src/mixins/_create-colors.scss +89 -94
- package/test/test.css +0 -4592
- package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.CS_28jj8.js +0 -1
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/assets/style.BsKZwvOR.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/assets/app.
|
|
12
|
+
<script type="module" src="/assets/app.CBPosL5d.js"></script>
|
|
13
13
|
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
-
<link rel="modulepreload" href="/assets/chunks/theme.
|
|
14
|
+
<link rel="modulepreload" href="/assets/chunks/theme.BeEqdqye.js">
|
|
15
15
|
<link rel="modulepreload" href="/assets/chunks/framework.BZemHgQ6.js">
|
|
16
16
|
<link rel="modulepreload" href="/assets/mixins_create-helper-margin.md.DqwBKQ0G.lean.js">
|
|
17
17
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/assets/style.BsKZwvOR.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/assets/app.
|
|
12
|
+
<script type="module" src="/assets/app.CBPosL5d.js"></script>
|
|
13
13
|
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
-
<link rel="modulepreload" href="/assets/chunks/theme.
|
|
14
|
+
<link rel="modulepreload" href="/assets/chunks/theme.BeEqdqye.js">
|
|
15
15
|
<link rel="modulepreload" href="/assets/chunks/framework.BZemHgQ6.js">
|
|
16
16
|
<link rel="modulepreload" href="/assets/mixins_create-helper-padding.md.Br9TOGl1.lean.js">
|
|
17
17
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/assets/style.BsKZwvOR.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/assets/app.
|
|
12
|
+
<script type="module" src="/assets/app.CBPosL5d.js"></script>
|
|
13
13
|
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
-
<link rel="modulepreload" href="/assets/chunks/theme.
|
|
14
|
+
<link rel="modulepreload" href="/assets/chunks/theme.BeEqdqye.js">
|
|
15
15
|
<link rel="modulepreload" href="/assets/chunks/framework.BZemHgQ6.js">
|
|
16
16
|
<link rel="modulepreload" href="/assets/mixins_create-instruction.md.BeAIoeQx.lean.js">
|
|
17
17
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guebbit/css-toolkit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"description": "A repository containing helpful SCSS functions, mixins, and utilities for streamlining and standardizing CSS development",
|
|
6
6
|
"main": "vite.config.js",
|
|
7
7
|
"files": [
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"publish:public": "npm publish --access public"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@types/node": "^22.13.
|
|
27
|
+
"@types/node": "^22.13.8",
|
|
28
28
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
29
29
|
"autoprefixer": "^10.4.20",
|
|
30
30
|
"breakpoint-sass": "^3.0.0",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"postcss": "^8.5.3",
|
|
36
36
|
"postcss-loader": "^8.1.1",
|
|
37
37
|
"postcss-prefix-selector": "^2.1.0",
|
|
38
|
-
"sass": "^1.85.
|
|
38
|
+
"sass": "^1.85.1",
|
|
39
39
|
"style-loader": "^4.0.0",
|
|
40
|
-
"stylelint": "^16.
|
|
40
|
+
"stylelint": "^16.15.0",
|
|
41
41
|
"stylelint-config-prettier-scss": "^1.0.0",
|
|
42
42
|
"stylelint-config-standard-scss": "^14.0.0",
|
|
43
43
|
"stylelint-scss": "^6.11.1",
|
|
44
|
-
"vite": "^6.
|
|
44
|
+
"vite": "^6.2.0",
|
|
45
45
|
"vitepress": "^1.6.3"
|
|
46
46
|
},
|
|
47
47
|
"repository": {
|
|
@@ -7,29 +7,21 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @param $color-list - list of colors (like $colors-collection: ("branch": ( "leaf: $color" )))
|
|
9
9
|
* @param $prefix
|
|
10
|
-
* @param $branch-list: - when filled: becomes a whitelist (aka: include only listed brands)
|
|
11
10
|
*/
|
|
12
|
-
@mixin create-colors-vars($color-list: (), $prefix: ""
|
|
11
|
+
@mixin create-colors-vars($color-list: (), $prefix: "") {
|
|
13
12
|
// for every branch
|
|
14
13
|
@each $branch-name, $branch in $color-list {
|
|
15
|
-
//
|
|
16
|
-
@
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// @if meta.type-of($scolor) == color {
|
|
22
|
-
--#{$prefix}#{$branch-name}-#{$sname}: #{color-functions.extract-colors($scolor)};
|
|
23
|
-
// _}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@each $sname, $scolor in $branch {
|
|
27
|
-
// @if meta.type-of($scolor) == color {
|
|
28
|
-
--#{$prefix}on-#{$branch-name}-#{$sname}: #{color-functions.extract-colors(color-functions.color-contrast($scolor))};
|
|
29
|
-
// _}
|
|
30
|
-
}
|
|
14
|
+
// for every color
|
|
15
|
+
@each $color-name, $color-value in $branch {
|
|
16
|
+
// @if meta.type-of($scolor) == color {
|
|
17
|
+
--#{$prefix}#{$branch-name}-#{$color-name}: #{color-functions.extract-colors($color-value)};
|
|
18
|
+
// _}
|
|
19
|
+
}
|
|
31
20
|
|
|
32
|
-
|
|
21
|
+
@each $color-name, $color-value in $branch {
|
|
22
|
+
// @if meta.type-of($scolor) == color {
|
|
23
|
+
--#{$prefix}on-#{$branch-name}-#{$color-name}: #{color-functions.extract-colors(color-functions.color-contrast($color-value))};
|
|
24
|
+
// _}
|
|
33
25
|
}
|
|
34
26
|
}
|
|
35
27
|
}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* @param $vars: if true, use css vars instead of rgb
|
|
11
11
|
* @param $prefix: prefix that applies to classes
|
|
12
12
|
* @param $prefixV: prefix that applies to vars (if true)
|
|
13
|
-
* @param $branch-list: - when filled: becomes a whitelist (aka: include only listed brands)
|
|
14
13
|
* @param $feature-list: - when filled: becomes a whitelist. May become cumbersome and many are not needed. Use with care.
|
|
15
14
|
* - text
|
|
16
15
|
* - background
|
|
@@ -18,136 +17,132 @@
|
|
|
18
17
|
* - pseudo (bg only, text very rarely used)
|
|
19
18
|
* - hover
|
|
20
19
|
*/
|
|
21
|
-
@mixin create-colors($color-list: (), $vars: false, $prefix: "", $prefixV: "", $
|
|
20
|
+
@mixin create-colors($color-list: (), $vars: false, $prefix: "", $prefixV: "", $feature-list: ()) {
|
|
22
21
|
// for every branch
|
|
23
22
|
@each $branch-name, $branch in $color-list {
|
|
24
|
-
//
|
|
25
|
-
@
|
|
23
|
+
// for every leaf
|
|
24
|
+
@each $color-name, $color-value in $branch {
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
@if not list.index($branch-name, "gradient") and (list.length($feature-list) < 1 or list.index($feature-list, "text")) {
|
|
27
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-text {
|
|
28
|
+
@if $vars {
|
|
29
|
+
color: var(--#{$prefixV}#{$branch-name}-#{$color-name}) !important;
|
|
30
|
+
} @else {
|
|
31
|
+
color: $color-value !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
29
35
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
@if not list.index($branch-name, "gradient") and (list.length($feature-list) < 1 or list.index($feature-list, "border")) {
|
|
37
|
+
@if $vars {
|
|
38
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-border {
|
|
39
|
+
border-color: var(--#{$prefixV}#{$branch-name}-#{$color-name}) !important;
|
|
40
|
+
}
|
|
41
|
+
} @else {
|
|
42
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-border {
|
|
43
|
+
border-color: $color-value !important;
|
|
37
44
|
}
|
|
38
45
|
}
|
|
46
|
+
}
|
|
39
47
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
@if list.length($feature-list) < 1 or list.index($feature-list, "background") {
|
|
49
|
+
@if $vars {
|
|
50
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-bg {
|
|
51
|
+
background-color: var(--#{$prefixV}#{$branch-name}-#{$color-name}) !important;
|
|
52
|
+
color: var(--#{$prefixV}on-#{$branch-name}-#{$color-name}) !important;
|
|
53
|
+
}
|
|
54
|
+
} @else {
|
|
55
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-bg {
|
|
56
|
+
background-color: $color-value !important;
|
|
49
57
|
}
|
|
50
58
|
}
|
|
59
|
+
}
|
|
51
60
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
@if list.length($feature-list) < 1 or list.index($feature-list, "pseudo") {
|
|
62
|
+
@if $vars {
|
|
63
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-pseudo-bg {
|
|
64
|
+
&::after,
|
|
65
|
+
&::before {
|
|
66
|
+
background-color: var(--#{$prefixV}#{$branch-name}-#{$color-name}) !important;
|
|
57
67
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
68
|
+
}
|
|
69
|
+
} @else {
|
|
70
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-pseudo-bg {
|
|
71
|
+
&::after,
|
|
72
|
+
&::before {
|
|
73
|
+
background-color: $color-value !important;
|
|
61
74
|
}
|
|
62
75
|
}
|
|
63
76
|
}
|
|
77
|
+
}
|
|
64
78
|
|
|
65
|
-
|
|
79
|
+
@if list.length($feature-list) < 1 or list.index($feature-list, "hover") {
|
|
80
|
+
|
|
81
|
+
@if not list.index($branch-name, "gradient") and (list.length($feature-list) < 1 or list.index($feature-list, "text")) {
|
|
66
82
|
@if $vars {
|
|
67
|
-
.#{$prefix}#{$branch-name}-#{$
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
background-color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
|
|
83
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-hover-text {
|
|
84
|
+
&:hover {
|
|
85
|
+
color: var(--#{$prefixV}#{$branch-name}-#{$color-name}) !important;
|
|
71
86
|
}
|
|
72
87
|
}
|
|
73
88
|
} @else {
|
|
74
|
-
.#{$prefix}#{$branch-name}-#{$
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
background-color: $scolor !important;
|
|
89
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-hover-text {
|
|
90
|
+
&:hover {
|
|
91
|
+
color: $color-value !important;
|
|
78
92
|
}
|
|
79
93
|
}
|
|
80
94
|
}
|
|
81
95
|
}
|
|
82
96
|
|
|
83
|
-
@if list.length($feature-list) < 1 or list.index($feature-list, "
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
&:hover {
|
|
89
|
-
color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
} @else {
|
|
93
|
-
.#{$prefix}#{$branch-name}-#{$sname}-hover-text {
|
|
94
|
-
&:hover {
|
|
95
|
-
color: $scolor !important;
|
|
96
|
-
}
|
|
97
|
+
@if not list.index($branch-name, "gradient") and (list.length($feature-list) < 1 or list.index($feature-list, "border")) {
|
|
98
|
+
@if $vars {
|
|
99
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-hover-border {
|
|
100
|
+
&:hover {
|
|
101
|
+
border-color: var(--#{$prefixV}#{$branch-name}-#{$color-name}) !important;
|
|
97
102
|
}
|
|
98
103
|
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
.#{$prefix}#{$branch-name}-#{$sname}-hover-border {
|
|
104
|
-
&:hover {
|
|
105
|
-
border-color: var(--#{$prefixV}#{$branch-name}-#{$sname}) !important;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
} @else {
|
|
109
|
-
.#{$prefix}#{$branch-name}-#{$sname}-hover-border {
|
|
110
|
-
&:hover {
|
|
111
|
-
border-color: $scolor !important;
|
|
112
|
-
}
|
|
104
|
+
} @else {
|
|
105
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-hover-border {
|
|
106
|
+
&:hover {
|
|
107
|
+
border-color: $color-value !important;
|
|
113
108
|
}
|
|
114
109
|
}
|
|
115
110
|
}
|
|
111
|
+
}
|
|
116
112
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
113
|
+
@if list.length($feature-list) < 1 or list.index($feature-list, "background") {
|
|
114
|
+
@if $vars {
|
|
115
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-hover-bg {
|
|
116
|
+
&:hover {
|
|
117
|
+
background-color: var(--#{$prefixV}#{$branch-name}-#{$color-name}) !important;
|
|
118
|
+
color: var(--#{$prefixV}on-#{$branch-name}-#{$color-name}) !important;
|
|
124
119
|
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
}
|
|
121
|
+
} @else {
|
|
122
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-hover-bg {
|
|
123
|
+
&:hover {
|
|
124
|
+
background-color: $color-value !important;
|
|
130
125
|
}
|
|
131
126
|
}
|
|
132
127
|
}
|
|
128
|
+
}
|
|
133
129
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
130
|
+
@if list.length($feature-list) < 1 or list.index($feature-list, "pseudo") {
|
|
131
|
+
@if $vars {
|
|
132
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-hover-pseudo-bg {
|
|
133
|
+
&:hover {
|
|
134
|
+
&::after,
|
|
135
|
+
&::before {
|
|
136
|
+
background-color: var(--#{$prefixV}#{$branch-name}-#{$color-name}) !important;
|
|
142
137
|
}
|
|
143
138
|
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
139
|
+
}
|
|
140
|
+
} @else {
|
|
141
|
+
.#{$prefix}#{$branch-name}-#{$color-name}-hover-pseudo-bg {
|
|
142
|
+
&:hover {
|
|
143
|
+
&::after,
|
|
144
|
+
&::before {
|
|
145
|
+
background-color: $color-value !important;
|
|
151
146
|
}
|
|
152
147
|
}
|
|
153
148
|
}
|