@guebbit/css-toolkit 1.2.0 → 1.2.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/LICENSE +661 -661
- package/README.md +5 -5
- package/docs/.postcssrc.cjs +11 -11
- package/docs/.vitepress/config.ts +88 -88
- package/docs/.vitepress/dist/404.html +1 -1
- package/docs/.vitepress/dist/assets/{app.Cez_7bx7.js → app.BQiPqeST.js} +1 -1
- package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.C9A3MdGo.js +1 -0
- package/docs/.vitepress/dist/assets/chunks/{VPLocalSearchBox.lfLgIsvm.js → VPLocalSearchBox.Bz_zRP0g.js} +1 -1
- package/docs/.vitepress/dist/assets/chunks/{theme.ZIndENJH.js → theme.DOuq-6g9.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/docs/.vitepress/theme/index.js +11 -11
- package/docs/functions/colors.md +65 -65
- package/docs/logo.svg +55 -55
- package/docs/logotype.svg +149 -149
- package/docs/mixins/build-compatibility.md +22 -22
- package/docs/mixins/build-scrollbar.md +18 -18
- package/docs/mixins/create-helper-margin.md +25 -25
- package/docs/mixins/create-helper-padding.md +24 -24
- package/docs/mixins/create-instruction.md +32 -32
- package/package.json +61 -61
- package/src/colors/_bootstrap.scss +179 -179
- package/src/colors/_brands.scss +19 -19
- package/src/colors/_customs.scss +52 -52
- package/src/colors/_index.scss +199 -199
- package/src/functions/_colors.scss +133 -121
- package/src/functions/_helpers.scss +44 -42
- package/src/functions/_strings.scss +30 -30
- package/src/index.scss +12 -12
- package/src/mixins/_build-aspect-ratio.scss +36 -36
- package/src/mixins/_build-compatibility.scss +27 -27
- package/src/mixins/_build-scrollbar.scss +31 -31
- package/src/mixins/_create-colors.scss +118 -118
- package/src/mixins/_create-helper-margin.scss +38 -38
- package/src/mixins/_create-helper-padding.scss +40 -40
- package/src/mixins/_create-instructions.scss +11 -11
- package/test/compile.test.js +105 -105
- package/test/lint.test.js +48 -48
- package/test/test.css +104 -99
- package/test/test.scss +158 -158
- package/vite.config.ts +25 -25
- package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.CkfJPSmi.js +0 -1
package/test/test.css
CHANGED
|
@@ -5,17 +5,22 @@
|
|
|
5
5
|
* function credited to https://getbootstrap.com/
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
* Tint a color
|
|
9
|
-
* function credited to https://getbootstrap.com/
|
|
8
|
+
* Tint a color
|
|
10
9
|
*/
|
|
11
10
|
/**
|
|
12
|
-
* Shade a color
|
|
13
|
-
* function credited to https://getbootstrap.com/
|
|
11
|
+
* Shade a color
|
|
14
12
|
*/
|
|
15
13
|
/**
|
|
16
14
|
* Shade the color if the weight is positive, else tint it
|
|
17
15
|
* function credited to https://getbootstrap.com/
|
|
18
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* Return WCAG2.1 relative luminance
|
|
19
|
+
* See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
|
|
20
|
+
* See https://en.wikipedia.org/wiki/Relative_luminance
|
|
21
|
+
* Gives %, less than 50 darker is better, less than 50, lighter.
|
|
22
|
+
* Function like color.channel($color, "lightness", $space: hsl) gives a different %
|
|
23
|
+
*/
|
|
19
24
|
/**
|
|
20
25
|
* Compares contrast of a given color to the light/dark arguments and returns whichever is most "contrasty"
|
|
21
26
|
*/
|
|
@@ -4989,114 +4994,114 @@
|
|
|
4989
4994
|
--grey-700: 73 80 87;
|
|
4990
4995
|
--grey-800: 52 58 64;
|
|
4991
4996
|
--grey-900: 33 37 41;
|
|
4992
|
-
--blue-100:
|
|
4993
|
-
--blue-200: 158 197 254;
|
|
4994
|
-
--blue-300:
|
|
4995
|
-
--blue-400: 61 139 253;
|
|
4997
|
+
--blue-100: 206.6 226 254.6;
|
|
4998
|
+
--blue-200: 158.2 197 254.2;
|
|
4999
|
+
--blue-300: 109.8 168 253.8;
|
|
5000
|
+
--blue-400: 61.4 139 253.4;
|
|
4996
5001
|
--blue-500: 13 110 253;
|
|
4997
|
-
--blue-600: 10 88 202;
|
|
4998
|
-
--blue-700: 8 66
|
|
4999
|
-
--blue-800: 5 44 101;
|
|
5000
|
-
--blue-900:
|
|
5001
|
-
--indigo-100: 224 207 252;
|
|
5002
|
-
--indigo-200:
|
|
5003
|
-
--indigo-300: 163
|
|
5004
|
-
--indigo-400:
|
|
5002
|
+
--blue-600: 10.4 88 202.4;
|
|
5003
|
+
--blue-700: 7.8 66 151.8;
|
|
5004
|
+
--blue-800: 5.2 44 101.2;
|
|
5005
|
+
--blue-900: 2.6 22 50.6;
|
|
5006
|
+
--indigo-100: 224.4 207.2 252.4;
|
|
5007
|
+
--indigo-200: 193.8 159.4 249.8;
|
|
5008
|
+
--indigo-300: 163.2 111.6 247.2;
|
|
5009
|
+
--indigo-400: 132.6 63.8 244.6;
|
|
5005
5010
|
--indigo-500: 102 16 242;
|
|
5006
|
-
--indigo-600:
|
|
5007
|
-
--indigo-700: 61
|
|
5008
|
-
--indigo-800:
|
|
5009
|
-
--indigo-900: 20 3 48;
|
|
5010
|
-
--purple-100: 226 217
|
|
5011
|
-
--purple-200: 197 179 230;
|
|
5012
|
-
--purple-300:
|
|
5013
|
-
--purple-400:
|
|
5011
|
+
--indigo-600: 81.6 12.8 193.6;
|
|
5012
|
+
--indigo-700: 61.2 9.6 145.2;
|
|
5013
|
+
--indigo-800: 40.8 6.4 96.8;
|
|
5014
|
+
--indigo-900: 20.4 3.2 48.4;
|
|
5015
|
+
--purple-100: 226.2 217.2 242.6;
|
|
5016
|
+
--purple-200: 197.4 179.4 230.2;
|
|
5017
|
+
--purple-300: 168.6 141.6 217.8;
|
|
5018
|
+
--purple-400: 139.8 103.8 205.4;
|
|
5014
5019
|
--purple-500: 111 66 193;
|
|
5015
|
-
--purple-600:
|
|
5016
|
-
--purple-700:
|
|
5017
|
-
--purple-800: 44 26 77;
|
|
5018
|
-
--purple-900: 22 13
|
|
5019
|
-
--pink-100:
|
|
5020
|
-
--pink-200:
|
|
5021
|
-
--pink-300: 230
|
|
5022
|
-
--pink-400: 222
|
|
5020
|
+
--purple-600: 88.8 52.8 154.4;
|
|
5021
|
+
--purple-700: 66.6 39.6 115.8;
|
|
5022
|
+
--purple-800: 44.4 26.4 77.2;
|
|
5023
|
+
--purple-900: 22.2 13.2 38.6;
|
|
5024
|
+
--pink-100: 246.8 214.2 230.4;
|
|
5025
|
+
--pink-200: 238.6 173.4 205.8;
|
|
5026
|
+
--pink-300: 230.4 132.6 181.2;
|
|
5027
|
+
--pink-400: 222.2 91.8 156.6;
|
|
5023
5028
|
--pink-500: 214 51 132;
|
|
5024
|
-
--pink-600: 171
|
|
5025
|
-
--pink-700: 128
|
|
5026
|
-
--pink-800:
|
|
5027
|
-
--pink-900:
|
|
5028
|
-
--red-100: 248
|
|
5029
|
-
--red-200: 241 174
|
|
5030
|
-
--red-300: 234
|
|
5031
|
-
--red-400: 227 93 106;
|
|
5029
|
+
--pink-600: 171.2 40.8 105.6;
|
|
5030
|
+
--pink-700: 128.4 30.6 79.2;
|
|
5031
|
+
--pink-800: 85.6 20.4 52.8;
|
|
5032
|
+
--pink-900: 42.8 10.2 26.4;
|
|
5033
|
+
--red-100: 248 214.6 217.8;
|
|
5034
|
+
--red-200: 241 174.2 180.6;
|
|
5035
|
+
--red-300: 234 133.8 143.4;
|
|
5036
|
+
--red-400: 227 93.4 106.2;
|
|
5032
5037
|
--red-500: 220 53 69;
|
|
5033
|
-
--red-600: 176 42 55;
|
|
5034
|
-
--red-700: 132
|
|
5035
|
-
--red-800: 88 21
|
|
5036
|
-
--red-900: 44
|
|
5037
|
-
--orange-100:
|
|
5038
|
-
--orange-200: 254 203 161;
|
|
5039
|
-
--orange-300:
|
|
5040
|
-
--orange-400: 253
|
|
5038
|
+
--red-600: 176 42.4 55.2;
|
|
5039
|
+
--red-700: 132 31.8 41.4;
|
|
5040
|
+
--red-800: 88 21.2 27.6;
|
|
5041
|
+
--red-900: 44 10.6 13.8;
|
|
5042
|
+
--orange-100: 254.6 229.2 208;
|
|
5043
|
+
--orange-200: 254.2 203.4 161;
|
|
5044
|
+
--orange-300: 253.8 177.6 114;
|
|
5045
|
+
--orange-400: 253.4 151.8 67;
|
|
5041
5046
|
--orange-500: 253 126 20;
|
|
5042
|
-
--orange-600: 202
|
|
5043
|
-
--orange-700:
|
|
5044
|
-
--orange-800: 101 50 8;
|
|
5045
|
-
--orange-900:
|
|
5046
|
-
--yellow-100: 255
|
|
5047
|
-
--yellow-200: 255 230
|
|
5048
|
-
--yellow-300: 255
|
|
5049
|
-
--yellow-400: 255 205
|
|
5047
|
+
--orange-600: 202.4 100.8 16;
|
|
5048
|
+
--orange-700: 151.8 75.6 12;
|
|
5049
|
+
--orange-800: 101.2 50.4 8;
|
|
5050
|
+
--orange-900: 50.6 25.2 4;
|
|
5051
|
+
--yellow-100: 255 242.6 205.4;
|
|
5052
|
+
--yellow-200: 255 230.2 155.8;
|
|
5053
|
+
--yellow-300: 255 217.8 106.2;
|
|
5054
|
+
--yellow-400: 255 205.4 56.6;
|
|
5050
5055
|
--yellow-500: 255 193 7;
|
|
5051
|
-
--yellow-600: 204 154 6;
|
|
5052
|
-
--yellow-700: 153
|
|
5053
|
-
--yellow-800: 102 77
|
|
5054
|
-
--yellow-900: 51
|
|
5055
|
-
--green-100: 209 231
|
|
5056
|
-
--green-200: 163 207
|
|
5057
|
-
--green-300: 117 183 152;
|
|
5058
|
-
--green-400: 71 159 118;
|
|
5056
|
+
--yellow-600: 204 154.4 5.6;
|
|
5057
|
+
--yellow-700: 153 115.8 4.2;
|
|
5058
|
+
--yellow-800: 102 77.2 2.8;
|
|
5059
|
+
--yellow-900: 51 38.6 1.4;
|
|
5060
|
+
--green-100: 209 231 220.8;
|
|
5061
|
+
--green-200: 163 207 186.6;
|
|
5062
|
+
--green-300: 117 183 152.4;
|
|
5063
|
+
--green-400: 71 159 118.2;
|
|
5059
5064
|
--green-500: 25 135 84;
|
|
5060
5065
|
--green-600: 25 135 84;
|
|
5061
|
-
--green-700: 20 108 67;
|
|
5062
|
-
--green-800: 15 81 50;
|
|
5063
|
-
--green-900: 10 54
|
|
5064
|
-
--teal-100: 210 244 234;
|
|
5065
|
-
--teal-200:
|
|
5066
|
-
--teal-300: 121
|
|
5067
|
-
--teal-400:
|
|
5066
|
+
--green-700: 20 108 67.2;
|
|
5067
|
+
--green-800: 15 81 50.4;
|
|
5068
|
+
--green-900: 10 54 33.6;
|
|
5069
|
+
--teal-100: 210.4 244.2 234.2;
|
|
5070
|
+
--teal-200: 165.8 233.4 213.4;
|
|
5071
|
+
--teal-300: 121.2 222.6 192.6;
|
|
5072
|
+
--teal-400: 76.6 211.8 171.8;
|
|
5068
5073
|
--teal-500: 32 201 151;
|
|
5069
|
-
--teal-600:
|
|
5070
|
-
--teal-700: 19
|
|
5071
|
-
--teal-800:
|
|
5072
|
-
--teal-900: 6 40 30;
|
|
5073
|
-
--cyan-100:
|
|
5074
|
-
--cyan-200: 158
|
|
5075
|
-
--cyan-300:
|
|
5076
|
-
--cyan-400: 61
|
|
5074
|
+
--teal-600: 25.6 160.8 120.8;
|
|
5075
|
+
--teal-700: 19.2 120.6 90.6;
|
|
5076
|
+
--teal-800: 12.8 80.4 60.4;
|
|
5077
|
+
--teal-900: 6.4 40.2 30.2;
|
|
5078
|
+
--cyan-100: 206.6 244.4 252;
|
|
5079
|
+
--cyan-200: 158.2 233.8 249;
|
|
5080
|
+
--cyan-300: 109.8 223.2 246;
|
|
5081
|
+
--cyan-400: 61.4 212.6 243;
|
|
5077
5082
|
--cyan-500: 13 202 240;
|
|
5078
|
-
--cyan-600: 10
|
|
5079
|
-
--cyan-700: 8 121 144;
|
|
5080
|
-
--cyan-800: 5
|
|
5081
|
-
--cyan-900:
|
|
5082
|
-
--flatrica-green-100: 205 237
|
|
5083
|
-
--flatrica-green-200: 155
|
|
5084
|
-
--flatrica-green-300:
|
|
5085
|
-
--flatrica-green-400:
|
|
5083
|
+
--cyan-600: 10.4 161.6 192;
|
|
5084
|
+
--cyan-700: 7.8 121.2 144;
|
|
5085
|
+
--cyan-800: 5.2 80.8 96;
|
|
5086
|
+
--cyan-900: 2.6 40.4 48;
|
|
5087
|
+
--flatrica-green-100: 205.2 237.4 223.8;
|
|
5088
|
+
--flatrica-green-200: 155.4 219.8 192.6;
|
|
5089
|
+
--flatrica-green-300: 105.6 202.2 161.4;
|
|
5090
|
+
--flatrica-green-400: 55.8 184.6 130.2;
|
|
5086
5091
|
--flatrica-green-500: 6 167 99;
|
|
5087
|
-
--flatrica-green-600:
|
|
5088
|
-
--flatrica-green-700:
|
|
5089
|
-
--flatrica-green-800: 2
|
|
5090
|
-
--flatrica-green-900: 1 33
|
|
5091
|
-
--manga-red-100: 246
|
|
5092
|
-
--manga-red-200:
|
|
5093
|
-
--manga-red-300: 229 116 115;
|
|
5094
|
-
--manga-red-400:
|
|
5092
|
+
--flatrica-green-600: 4.8 133.6 79.2;
|
|
5093
|
+
--flatrica-green-700: 3.6 100.2 59.4;
|
|
5094
|
+
--flatrica-green-800: 2.4 66.8 39.6;
|
|
5095
|
+
--flatrica-green-900: 1.2 33.4 19.8;
|
|
5096
|
+
--manga-red-100: 246.4 208.8 208.4;
|
|
5097
|
+
--manga-red-200: 237.8 162.6 161.8;
|
|
5098
|
+
--manga-red-300: 229.2 116.4 115.2;
|
|
5099
|
+
--manga-red-400: 220.6 70.2 68.6;
|
|
5095
5100
|
--manga-red-500: 212 24 22;
|
|
5096
|
-
--manga-red-600:
|
|
5097
|
-
--manga-red-700: 127 14 13;
|
|
5098
|
-
--manga-red-800:
|
|
5099
|
-
--manga-red-900: 42
|
|
5101
|
+
--manga-red-600: 169.6 19.2 17.6;
|
|
5102
|
+
--manga-red-700: 127.2 14.4 13.2;
|
|
5103
|
+
--manga-red-800: 84.8 9.6 8.8;
|
|
5104
|
+
--manga-red-900: 42.4 4.8 4.4;
|
|
5100
5105
|
--brand-facebook: 59 89 152;
|
|
5101
5106
|
--brand-youtube: 204 24 30;
|
|
5102
5107
|
--brand-twitter: 51 204 255;
|
package/test/test.scss
CHANGED
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
@use "../src/index" as guebbit;
|
|
2
|
-
|
|
3
|
-
@include guebbit.create-colors(guebbit.$colors-collection);
|
|
4
|
-
|
|
5
|
-
@include guebbit.create-helper-margin((
|
|
6
|
-
(auto, auto),
|
|
7
|
-
(6, 6px),
|
|
8
|
-
(12, 12px),
|
|
9
|
-
(24, 24px),
|
|
10
|
-
(36, 36px),
|
|
11
|
-
(48, 48px),
|
|
12
|
-
));
|
|
13
|
-
|
|
14
|
-
@include guebbit.create-helper-padding((
|
|
15
|
-
(6, 6px),
|
|
16
|
-
(12, 12px),
|
|
17
|
-
(24, 24px),
|
|
18
|
-
(36, 36px),
|
|
19
|
-
(48, 48px),
|
|
20
|
-
));
|
|
21
|
-
|
|
22
|
-
@include guebbit.create-instructions("font-size", (
|
|
23
|
-
(n2, 0.6em),
|
|
24
|
-
(n1, 0.8em),
|
|
25
|
-
(1, 1.2em),
|
|
26
|
-
(2, 1.5em),
|
|
27
|
-
(3, 2em),
|
|
28
|
-
));
|
|
29
|
-
|
|
30
|
-
@include guebbit.create-instructions("opacity", (
|
|
31
|
-
(0, 0),
|
|
32
|
-
(25, 0.25),
|
|
33
|
-
(50, 0.50),
|
|
34
|
-
(75, 0.75),
|
|
35
|
-
(100, 1),
|
|
36
|
-
));
|
|
37
|
-
|
|
38
|
-
@include guebbit.create-instructions("width", (
|
|
39
|
-
(25, 25%),
|
|
40
|
-
(50, 50%),
|
|
41
|
-
(75, 75%),
|
|
42
|
-
(100, 100%),
|
|
43
|
-
(p25, 25px),
|
|
44
|
-
(p50, 50px),
|
|
45
|
-
(p75, 75px),
|
|
46
|
-
(p100, 100px)
|
|
47
|
-
), true);
|
|
48
|
-
|
|
49
|
-
@include guebbit.create-instructions("min-width", (
|
|
50
|
-
(25, 25%),
|
|
51
|
-
(50, 50%),
|
|
52
|
-
(75, 75%),
|
|
53
|
-
(100, 100%),
|
|
54
|
-
(p25, 25px),
|
|
55
|
-
(p50, 50px),
|
|
56
|
-
(p75, 75px),
|
|
57
|
-
(p100, 100px)
|
|
58
|
-
), true);
|
|
59
|
-
|
|
60
|
-
@include guebbit.create-instructions("gap", (
|
|
61
|
-
(6, 6px),
|
|
62
|
-
(12, 12px),
|
|
63
|
-
(24, 24px),
|
|
64
|
-
), true, "flex-");
|
|
65
|
-
|
|
66
|
-
.aspect-ratio-1-1{
|
|
67
|
-
@include guebbit.build-aspect-ratio(100%);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.aspect-ratio-16-9{
|
|
71
|
-
@include guebbit.build-aspect-ratio-container(56%);
|
|
72
|
-
|
|
73
|
-
.content{
|
|
74
|
-
@include guebbit.build-aspect-ratio-anchor;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
.test-compatibility{
|
|
80
|
-
@include guebbit.build-compatibility("ie"){
|
|
81
|
-
&::after{
|
|
82
|
-
content: "this is internet explorer";
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@include guebbit.build-compatibility("edge"){
|
|
87
|
-
&::after{
|
|
88
|
-
content: "this is microsoft edge";
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@include guebbit.build-compatibility("firefox"){
|
|
93
|
-
&::after{
|
|
94
|
-
content: "this is firefox";
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// check functions
|
|
100
|
-
$test-color--light: #222;
|
|
101
|
-
$test-color--dark: #ddd;
|
|
102
|
-
$map-deep-get-test: (
|
|
103
|
-
'size': (
|
|
104
|
-
'sml': 10px
|
|
105
|
-
)
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
$map-deep-get-var: guebbit.map-deep-get($map-deep-get-test, 'size', 'sml');
|
|
109
|
-
|
|
110
|
-
:root{
|
|
111
|
-
// --- rgba + rgba = rgba
|
|
112
|
-
--color-opaque-1: #{guebbit.color-opaque(rgba(0,0,0,0.2), rgba($test-color--light, 0.8))};
|
|
113
|
-
// --- hex + rgba = rgb
|
|
114
|
-
--color-opaque-2: #{guebbit.color-opaque(#000, rgba($test-color--dark, 0.5))};
|
|
115
|
-
// --- hex + hex = hex
|
|
116
|
-
--color-opaque-3: #{guebbit.color-opaque(#000, $test-color--dark)};
|
|
117
|
-
// ---
|
|
118
|
-
--color-tint-1: #{guebbit.color-tint($test-color--light, 25%)};
|
|
119
|
-
--color-tint-2: #{guebbit.color-tint($test-color--dark, 25%)};
|
|
120
|
-
// ---
|
|
121
|
-
--color-shade-1: #{guebbit.color-shade($test-color--light, 25%)};
|
|
122
|
-
--color-shade-2: #{guebbit.color-shade($test-color--dark, 25%)};
|
|
123
|
-
// ---
|
|
124
|
-
--color-shift-1: #{guebbit.color-shift($test-color--light, 25%)};
|
|
125
|
-
--color-shift-2: #{guebbit.color-shift($test-color--dark, 25%)};
|
|
126
|
-
--color-shift-3: #{guebbit.color-shift($test-color--light, -25%)};
|
|
127
|
-
--color-shift-4: #{guebbit.color-shift($test-color--dark, -25%)};
|
|
128
|
-
// ---
|
|
129
|
-
--color-contrast-1: #{guebbit.color-contrast($test-color--light)};
|
|
130
|
-
--color-contrast-2: #{guebbit.color-contrast($test-color--dark)};
|
|
131
|
-
// ---
|
|
132
|
-
--color-brightness-1: #{guebbit.color-contrast($test-color--light)};
|
|
133
|
-
--color-brightness-2: #{guebbit.color-contrast($test-color--dark)};
|
|
134
|
-
// ---
|
|
135
|
-
--extract-colors-1: #{guebbit.extract-colors()};
|
|
136
|
-
--extract-colors-2: #{guebbit.extract-colors($test-color--light)};
|
|
137
|
-
--extract-colors-3: #{guebbit.extract-colors($test-color--dark)};
|
|
138
|
-
--extract-colors-4: #{guebbit.extract-colors($test-color--light, 2, true)};
|
|
139
|
-
--extract-colors-5: #{guebbit.extract-colors($test-color--dark, 2, true)};
|
|
140
|
-
--extract-colors-6: #{guebbit.extract-colors(rgb(0 255 0))};
|
|
141
|
-
--extract-colors-7: #{guebbit.extract-colors(rgba(0 255 0 / 0.5))};
|
|
142
|
-
--extract-colors-8: #{guebbit.extract-colors(rgb(0 255 0), 2, true)};
|
|
143
|
-
--extract-colors-9: #{guebbit.extract-colors(rgba(0 255 0 / 0.5), 2, true)};
|
|
144
|
-
--extract-colors-10: #{guebbit.extract-colors(rgb(0, 255, 0))};
|
|
145
|
-
--extract-colors-11: #{guebbit.extract-colors(rgba(0, 255, 0, 0.5))};
|
|
146
|
-
--extract-colors-12: #{guebbit.extract-colors(rgb(0, 255, 0), 2, true)};
|
|
147
|
-
--extract-colors-13: #{guebbit.extract-colors(rgba(0, 255, 0, 0.5), 2, true)};
|
|
148
|
-
// ---
|
|
149
|
-
--no-null-1: #{guebbit.no-null-var((undefined, null, transparent, red))};
|
|
150
|
-
--no-null-2: #{guebbit.no-null-var((blue))};
|
|
151
|
-
// ---
|
|
152
|
-
--no-trasparent-1: #{guebbit.no-target-var(transparent, transparent)};
|
|
153
|
-
--no-trasparent-2: #{guebbit.no-target-var("test", "test")};
|
|
154
|
-
--no-trasparent-3: #{guebbit.no-target-var(transparent, #123456)};
|
|
155
|
-
// ---
|
|
156
|
-
--map-deep-get: #{$map-deep-get-var};
|
|
157
|
-
// --string-split: #{guebbit.string-split())};
|
|
158
|
-
// --string-split: #{guebbit.string-ends-with("find-this-word", "this"))};
|
|
1
|
+
@use "../src/index" as guebbit;
|
|
2
|
+
|
|
3
|
+
@include guebbit.create-colors(guebbit.$colors-collection);
|
|
4
|
+
|
|
5
|
+
@include guebbit.create-helper-margin((
|
|
6
|
+
(auto, auto),
|
|
7
|
+
(6, 6px),
|
|
8
|
+
(12, 12px),
|
|
9
|
+
(24, 24px),
|
|
10
|
+
(36, 36px),
|
|
11
|
+
(48, 48px),
|
|
12
|
+
));
|
|
13
|
+
|
|
14
|
+
@include guebbit.create-helper-padding((
|
|
15
|
+
(6, 6px),
|
|
16
|
+
(12, 12px),
|
|
17
|
+
(24, 24px),
|
|
18
|
+
(36, 36px),
|
|
19
|
+
(48, 48px),
|
|
20
|
+
));
|
|
21
|
+
|
|
22
|
+
@include guebbit.create-instructions("font-size", (
|
|
23
|
+
(n2, 0.6em),
|
|
24
|
+
(n1, 0.8em),
|
|
25
|
+
(1, 1.2em),
|
|
26
|
+
(2, 1.5em),
|
|
27
|
+
(3, 2em),
|
|
28
|
+
));
|
|
29
|
+
|
|
30
|
+
@include guebbit.create-instructions("opacity", (
|
|
31
|
+
(0, 0),
|
|
32
|
+
(25, 0.25),
|
|
33
|
+
(50, 0.50),
|
|
34
|
+
(75, 0.75),
|
|
35
|
+
(100, 1),
|
|
36
|
+
));
|
|
37
|
+
|
|
38
|
+
@include guebbit.create-instructions("width", (
|
|
39
|
+
(25, 25%),
|
|
40
|
+
(50, 50%),
|
|
41
|
+
(75, 75%),
|
|
42
|
+
(100, 100%),
|
|
43
|
+
(p25, 25px),
|
|
44
|
+
(p50, 50px),
|
|
45
|
+
(p75, 75px),
|
|
46
|
+
(p100, 100px)
|
|
47
|
+
), true);
|
|
48
|
+
|
|
49
|
+
@include guebbit.create-instructions("min-width", (
|
|
50
|
+
(25, 25%),
|
|
51
|
+
(50, 50%),
|
|
52
|
+
(75, 75%),
|
|
53
|
+
(100, 100%),
|
|
54
|
+
(p25, 25px),
|
|
55
|
+
(p50, 50px),
|
|
56
|
+
(p75, 75px),
|
|
57
|
+
(p100, 100px)
|
|
58
|
+
), true);
|
|
59
|
+
|
|
60
|
+
@include guebbit.create-instructions("gap", (
|
|
61
|
+
(6, 6px),
|
|
62
|
+
(12, 12px),
|
|
63
|
+
(24, 24px),
|
|
64
|
+
), true, "flex-");
|
|
65
|
+
|
|
66
|
+
.aspect-ratio-1-1{
|
|
67
|
+
@include guebbit.build-aspect-ratio(100%);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.aspect-ratio-16-9{
|
|
71
|
+
@include guebbit.build-aspect-ratio-container(56%);
|
|
72
|
+
|
|
73
|
+
.content{
|
|
74
|
+
@include guebbit.build-aspect-ratio-anchor;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
.test-compatibility{
|
|
80
|
+
@include guebbit.build-compatibility("ie"){
|
|
81
|
+
&::after{
|
|
82
|
+
content: "this is internet explorer";
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include guebbit.build-compatibility("edge"){
|
|
87
|
+
&::after{
|
|
88
|
+
content: "this is microsoft edge";
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@include guebbit.build-compatibility("firefox"){
|
|
93
|
+
&::after{
|
|
94
|
+
content: "this is firefox";
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// check functions
|
|
100
|
+
$test-color--light: #222;
|
|
101
|
+
$test-color--dark: #ddd;
|
|
102
|
+
$map-deep-get-test: (
|
|
103
|
+
'size': (
|
|
104
|
+
'sml': 10px
|
|
105
|
+
)
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
$map-deep-get-var: guebbit.map-deep-get($map-deep-get-test, 'size', 'sml');
|
|
109
|
+
|
|
110
|
+
:root{
|
|
111
|
+
// --- rgba + rgba = rgba
|
|
112
|
+
--color-opaque-1: #{guebbit.color-opaque(rgba(0,0,0,0.2), rgba($test-color--light, 0.8))};
|
|
113
|
+
// --- hex + rgba = rgb
|
|
114
|
+
--color-opaque-2: #{guebbit.color-opaque(#000, rgba($test-color--dark, 0.5))};
|
|
115
|
+
// --- hex + hex = hex
|
|
116
|
+
--color-opaque-3: #{guebbit.color-opaque(#000, $test-color--dark)};
|
|
117
|
+
// ---
|
|
118
|
+
--color-tint-1: #{guebbit.color-tint($test-color--light, 25%)};
|
|
119
|
+
--color-tint-2: #{guebbit.color-tint($test-color--dark, 25%)};
|
|
120
|
+
// ---
|
|
121
|
+
--color-shade-1: #{guebbit.color-shade($test-color--light, 25%)};
|
|
122
|
+
--color-shade-2: #{guebbit.color-shade($test-color--dark, 25%)};
|
|
123
|
+
// ---
|
|
124
|
+
--color-shift-1: #{guebbit.color-shift($test-color--light, 25%)};
|
|
125
|
+
--color-shift-2: #{guebbit.color-shift($test-color--dark, 25%)};
|
|
126
|
+
--color-shift-3: #{guebbit.color-shift($test-color--light, -25%)};
|
|
127
|
+
--color-shift-4: #{guebbit.color-shift($test-color--dark, -25%)};
|
|
128
|
+
// ---
|
|
129
|
+
--color-contrast-1: #{guebbit.color-contrast($test-color--light)};
|
|
130
|
+
--color-contrast-2: #{guebbit.color-contrast($test-color--dark)};
|
|
131
|
+
// ---
|
|
132
|
+
--color-brightness-1: #{guebbit.color-contrast($test-color--light)};
|
|
133
|
+
--color-brightness-2: #{guebbit.color-contrast($test-color--dark)};
|
|
134
|
+
// ---
|
|
135
|
+
--extract-colors-1: #{guebbit.extract-colors()};
|
|
136
|
+
--extract-colors-2: #{guebbit.extract-colors($test-color--light)};
|
|
137
|
+
--extract-colors-3: #{guebbit.extract-colors($test-color--dark)};
|
|
138
|
+
--extract-colors-4: #{guebbit.extract-colors($test-color--light, 2, true)};
|
|
139
|
+
--extract-colors-5: #{guebbit.extract-colors($test-color--dark, 2, true)};
|
|
140
|
+
--extract-colors-6: #{guebbit.extract-colors(rgb(0 255 0))};
|
|
141
|
+
--extract-colors-7: #{guebbit.extract-colors(rgba(0 255 0 / 0.5))};
|
|
142
|
+
--extract-colors-8: #{guebbit.extract-colors(rgb(0 255 0), 2, true)};
|
|
143
|
+
--extract-colors-9: #{guebbit.extract-colors(rgba(0 255 0 / 0.5), 2, true)};
|
|
144
|
+
--extract-colors-10: #{guebbit.extract-colors(rgb(0, 255, 0))};
|
|
145
|
+
--extract-colors-11: #{guebbit.extract-colors(rgba(0, 255, 0, 0.5))};
|
|
146
|
+
--extract-colors-12: #{guebbit.extract-colors(rgb(0, 255, 0), 2, true)};
|
|
147
|
+
--extract-colors-13: #{guebbit.extract-colors(rgba(0, 255, 0, 0.5), 2, true)};
|
|
148
|
+
// ---
|
|
149
|
+
--no-null-1: #{guebbit.no-null-var((undefined, null, transparent, red))};
|
|
150
|
+
--no-null-2: #{guebbit.no-null-var((blue))};
|
|
151
|
+
// ---
|
|
152
|
+
--no-trasparent-1: #{guebbit.no-target-var(transparent, transparent)};
|
|
153
|
+
--no-trasparent-2: #{guebbit.no-target-var("test", "test")};
|
|
154
|
+
--no-trasparent-3: #{guebbit.no-target-var(transparent, #123456)};
|
|
155
|
+
// ---
|
|
156
|
+
--map-deep-get: #{$map-deep-get-var};
|
|
157
|
+
// --string-split: #{guebbit.string-split())};
|
|
158
|
+
// --string-split: #{guebbit.string-ends-with("find-this-word", "this"))};
|
|
159
159
|
}
|
package/vite.config.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
// root: "/",
|
|
6
|
-
build: {
|
|
7
|
-
outDir: path.join(__dirname, "dist"),
|
|
8
|
-
lib: {
|
|
9
|
-
entry: path.resolve(__dirname, "index.scss"), // TODO library.scss (import the various components)
|
|
10
|
-
name: "@guebbit/css-toolkit",
|
|
11
|
-
fileName: "css-toolkit",
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
server: {
|
|
15
|
-
port: 8080,
|
|
16
|
-
},
|
|
17
|
-
resolve: {
|
|
18
|
-
alias: [
|
|
19
|
-
{
|
|
20
|
-
find: '@',
|
|
21
|
-
replacement: path.resolve(__dirname, 'src')
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
plugins: [],
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
// root: "/",
|
|
6
|
+
build: {
|
|
7
|
+
outDir: path.join(__dirname, "dist"),
|
|
8
|
+
lib: {
|
|
9
|
+
entry: path.resolve(__dirname, "index.scss"), // TODO library.scss (import the various components)
|
|
10
|
+
name: "@guebbit/css-toolkit",
|
|
11
|
+
fileName: "css-toolkit",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
server: {
|
|
15
|
+
port: 8080,
|
|
16
|
+
},
|
|
17
|
+
resolve: {
|
|
18
|
+
alias: [
|
|
19
|
+
{
|
|
20
|
+
find: '@',
|
|
21
|
+
replacement: path.resolve(__dirname, 'src')
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
plugins: [],
|
|
26
26
|
});
|