@guebbit/css-toolkit 1.1.2 → 1.1.3
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 +2 -0
- package/docs/.vitepress/dist/404.html +3 -3
- package/docs/.vitepress/dist/assets/{app.CpyNzro9.js → app.BlbAZR_S.js} +1 -1
- package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.KjYvZcUz.js +1 -0
- package/docs/.vitepress/dist/assets/chunks/VPLocalSearchBox.BwVVD-os.js +7 -0
- package/docs/.vitepress/dist/assets/chunks/framework.Bt53DRYp.js +18 -0
- package/docs/.vitepress/dist/assets/chunks/{theme.CviQ0biq.js → theme.VODMs8XS.js} +2 -2
- package/docs/.vitepress/dist/assets/{colors_bootstrap.md.DiC9aO06.js → colors_bootstrap.md.Bfy-p7dM.js} +1 -1
- package/docs/.vitepress/dist/assets/{colors_bootstrap.md.DiC9aO06.lean.js → colors_bootstrap.md.Bfy-p7dM.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{colors_brands.md.Bp8_jfHR.js → colors_brands.md.Ch21qzT7.js} +1 -1
- package/docs/.vitepress/dist/assets/{colors_brands.md.Bp8_jfHR.lean.js → colors_brands.md.Ch21qzT7.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{colors_customs.md.DyEXln8b.js → colors_customs.md.CrumAnve.js} +1 -1
- package/docs/.vitepress/dist/assets/{colors_customs.md.DyEXln8b.lean.js → colors_customs.md.CrumAnve.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{functions_colors.md.CtYahXnA.js → functions_colors.md.Dz-AUCFY.js} +2 -4
- package/docs/.vitepress/dist/assets/{functions_colors.md.CtYahXnA.lean.js → functions_colors.md.Dz-AUCFY.lean.js} +2 -4
- package/docs/.vitepress/dist/assets/{functions_helpers.md.DZRTPA4t.js → functions_helpers.md.BLiEkjA1.js} +1 -1
- package/docs/.vitepress/dist/assets/{functions_helpers.md.DZRTPA4t.lean.js → functions_helpers.md.BLiEkjA1.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{functions_strings.md.BMMJdTdo.js → functions_strings.md.BHTeKsax.js} +1 -1
- package/docs/.vitepress/dist/assets/{functions_strings.md.BMMJdTdo.lean.js → functions_strings.md.BHTeKsax.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{index.md.2uetSBMH.js → index.md.Dwdim14B.js} +1 -1
- package/docs/.vitepress/dist/assets/{index.md.2uetSBMH.lean.js → index.md.Dwdim14B.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_build-aspect-ratio.md.8mabvpDg.js → mixins_build-aspect-ratio.md.l9MRJQQl.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_build-aspect-ratio.md.8mabvpDg.lean.js → mixins_build-aspect-ratio.md.l9MRJQQl.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_build-compatibility.md.cOIJ58bq.js → mixins_build-compatibility.md.t0sS5a2s.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_build-compatibility.md.cOIJ58bq.lean.js → mixins_build-compatibility.md.t0sS5a2s.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_build-scrollbar.md.DrR7vY38.js → mixins_build-scrollbar.md.C-TaPgpo.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_build-scrollbar.md.DrR7vY38.lean.js → mixins_build-scrollbar.md.C-TaPgpo.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_create-colors.md.FiVBK2v9.js → mixins_create-colors.md.Bs8hXar1.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_create-colors.md.FiVBK2v9.lean.js → mixins_create-colors.md.Bs8hXar1.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_create-helper-margin.md.B85aWiR9.js → mixins_create-helper-margin.md.BFzwO-0T.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_create-helper-margin.md.B85aWiR9.lean.js → mixins_create-helper-margin.md.BFzwO-0T.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_create-helper-padding.md._fxbDV5T.js → mixins_create-helper-padding.md.Ci6DL4m-.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_create-helper-padding.md._fxbDV5T.lean.js → mixins_create-helper-padding.md.Ci6DL4m-.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_create-instruction.md.DKI2LvdM.js → mixins_create-instruction.md.CGTPQqQv.js} +1 -1
- package/docs/.vitepress/dist/assets/{mixins_create-instruction.md.DKI2LvdM.lean.js → mixins_create-instruction.md.CGTPQqQv.lean.js} +1 -1
- package/docs/.vitepress/dist/assets/{style.DDLX1Ber.css → style.B-ztagZG.css} +1 -1
- package/docs/.vitepress/dist/colors/bootstrap.html +6 -6
- package/docs/.vitepress/dist/colors/brands.html +6 -6
- package/docs/.vitepress/dist/colors/customs.html +6 -6
- package/docs/.vitepress/dist/functions/colors.html +7 -9
- package/docs/.vitepress/dist/functions/helpers.html +6 -6
- package/docs/.vitepress/dist/functions/strings.html +6 -6
- package/docs/.vitepress/dist/hashmap.json +1 -1
- package/docs/.vitepress/dist/index.html +6 -6
- package/docs/.vitepress/dist/mixins/build-aspect-ratio.html +6 -6
- package/docs/.vitepress/dist/mixins/build-compatibility.html +6 -6
- package/docs/.vitepress/dist/mixins/build-scrollbar.html +6 -6
- package/docs/.vitepress/dist/mixins/create-colors.html +6 -6
- package/docs/.vitepress/dist/mixins/create-helper-margin.html +6 -6
- package/docs/.vitepress/dist/mixins/create-helper-padding.html +6 -6
- package/docs/.vitepress/dist/mixins/create-instruction.html +6 -6
- package/docs/functions/colors.md +1 -3
- package/package.json +13 -13
- package/src/colors/_bootstrap.scss +90 -89
- package/src/colors/_customs.scss +18 -16
- package/src/functions/_colors.scss +26 -35
- package/test/compile.test.js +9 -15
- package/test/test.css +5804 -5816
- package/test/test.scss +0 -6
- package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.CYE7S9pS.js +0 -1
- package/docs/.vitepress/dist/assets/chunks/VPLocalSearchBox.DrgBd5f4.js +0 -7
- package/docs/.vitepress/dist/assets/chunks/framework.DJJi9g99.js +0 -17
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<title>Create Instruction - base SCSS plus components</title>
|
|
7
7
|
<meta name="description" content="Guebbit's personal SCSS Library (MIT license, free to use).">
|
|
8
8
|
<meta name="generator" content="VitePress v1.3.4">
|
|
9
|
-
<link rel="preload stylesheet" href="/assets/style.
|
|
9
|
+
<link rel="preload stylesheet" href="/assets/style.B-ztagZG.css" as="style">
|
|
10
10
|
|
|
11
|
-
<script type="module" src="/assets/app.
|
|
11
|
+
<script type="module" src="/assets/app.BlbAZR_S.js"></script>
|
|
12
12
|
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
13
|
-
<link rel="modulepreload" href="/assets/chunks/theme.
|
|
14
|
-
<link rel="modulepreload" href="/assets/chunks/framework.
|
|
15
|
-
<link rel="modulepreload" href="/assets/mixins_create-instruction.md.
|
|
13
|
+
<link rel="modulepreload" href="/assets/chunks/theme.VODMs8XS.js">
|
|
14
|
+
<link rel="modulepreload" href="/assets/chunks/framework.Bt53DRYp.js">
|
|
15
|
+
<link rel="modulepreload" href="/assets/mixins_create-instruction.md.CGTPQqQv.lean.js">
|
|
16
16
|
<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>
|
|
17
17
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
18
18
|
</head>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
|
38
38
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
|
39
39
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="scss-variables" tabindex="-1">SCSS variables <a class="header-anchor" href="#scss-variables" aria-label="Permalink to "SCSS variables""></a></h2><table tabindex="0"><thead><tr><th style="text-align:left;">Variable</th><th style="text-align:left;">Description</th><th style="text-align:left;">Accepted Values</th><th style="text-align:left;">Default</th></tr></thead><tbody><tr><td style="text-align:left;"><code>$instruction</code></td><td style="text-align:left;">CSS instruction to insert</td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;"><code>none</code></td></tr><tr><td style="text-align:left;"><code>$measure-list</code></td><td style="text-align:left;">List of pairs <name, value></td><td style="text-align:left;"><code>Array<name,value>[]</code></td><td style="text-align:left;"><code>[]</code></td></tr><tr><td style="text-align:left;"><code>$important</code></td><td style="text-align:left;">Flag: if instruction is !important</td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;"><code>false</code></td></tr><tr><td style="text-align:left;"><code>$prefix</code></td><td style="text-align:left;">Eventual prefix (like <code>guebbit-</code>), to prevent collisions</td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">``</td></tr><tr><td style="text-align:left;"><code>$delimiter</code></td><td style="text-align:left;">Custom delimeter of the final classnames</td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;"><code>-</code></td></tr></tbody></table></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><!----></div><div class="pager" data-v-e257564d><a class="VPLink link pager-link next" href="/colors/bootstrap.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Next page</span><span class="title" data-v-e257564d>Bootstrap</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
|
40
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"colors_bootstrap.md\":\"
|
|
40
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"colors_bootstrap.md\":\"Bfy-p7dM\",\"colors_brands.md\":\"Ch21qzT7\",\"colors_customs.md\":\"CrumAnve\",\"functions_colors.md\":\"Dz-AUCFY\",\"functions_helpers.md\":\"BLiEkjA1\",\"functions_strings.md\":\"BHTeKsax\",\"index.md\":\"Dwdim14B\",\"mixins_build-aspect-ratio.md\":\"l9MRJQQl\",\"mixins_build-compatibility.md\":\"t0sS5a2s\",\"mixins_build-scrollbar.md\":\"C-TaPgpo\",\"mixins_create-colors.md\":\"Bs8hXar1\",\"mixins_create-helper-margin.md\":\"BFzwO-0T\",\"mixins_create-helper-padding.md\":\"Ci6DL4m-\",\"mixins_create-instruction.md\":\"CGTPQqQv\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Guebbit SCSS Library\",\"titleTemplate\":\":title - base SCSS plus components\",\"description\":\"Guebbit's personal SCSS Library (MIT license, free to use).\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/logotype.svg\",\"siteTitle\":\"SCSS Library\",\"search\":{\"provider\":\"local\"},\"nav\":[{\"text\":\"Github\",\"link\":\"https://github.com/Guebbit/css-toolkit\"}],\"sidebar\":[{\"text\":\"Colors\",\"collapsed\":false,\"items\":[{\"text\":\"Bootstrap\",\"link\":\"/colors/bootstrap.md\"},{\"text\":\"Brands\",\"link\":\"/colors/brands.md\"},{\"text\":\"Gradients\",\"link\":\"/colors/customs.md\"}]},{\"text\":\"Functions\",\"collapsed\":false,\"items\":[{\"text\":\"Colors\",\"link\":\"/functions/colors.md\"},{\"text\":\"Helpers\",\"link\":\"/functions/helpers.md\"}]},{\"text\":\"Mixins\",\"collapsed\":false,\"items\":[{\"text\":\"Build Aspect Ratio\",\"link\":\"/mixins/build-aspect-ratio.md\"},{\"text\":\"Build Compatibility\",\"link\":\"/mixins/build-compatibility.md\"},{\"text\":\"Build Scrollbar\",\"link\":\"/mixins/build-scrollbar.md\"},{\"text\":\"Create Colors\",\"link\":\"/mixins/create-colors.md\"},{\"text\":\"Create Size instruction\",\"link\":\"/mixins/create-instructions.md\"},{\"text\":\"Create Margin helper\",\"link\":\"/mixins/create-helper-margin.md\"},{\"text\":\"Create Padding helper\",\"link\":\"/mixins/create-helper-padding.md\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
41
41
|
|
|
42
42
|
</body>
|
|
43
43
|
</html>
|
package/docs/functions/colors.md
CHANGED
|
@@ -12,9 +12,7 @@ Gives %, less than 50 darker is better, less than 50, lighter.
|
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
```scss
|
|
15
|
-
|
|
16
|
-
@return math.div(((red($color) * .299) + (green($color) * .587) + (blue($color) * .114)), 255 * 100%);
|
|
17
|
-
}
|
|
15
|
+
TODO
|
|
18
16
|
```
|
|
19
17
|
|
|
20
18
|
| Variable | Description | Accepted Values | Default |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guebbit/css-toolkit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.3",
|
|
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,25 +24,25 @@
|
|
|
24
24
|
"publish:public": "npm publish --access public"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@types/node": "^22.
|
|
28
|
-
"@vitejs/plugin-vue": "^5.
|
|
29
|
-
"autoprefixer": "^10.4.
|
|
27
|
+
"@types/node": "^22.7.4",
|
|
28
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
29
|
+
"autoprefixer": "^10.4.20",
|
|
30
30
|
"breakpoint-sass": "^3.0.0",
|
|
31
31
|
"chai": "^5.1.1",
|
|
32
32
|
"css-loader": "^7.1.2",
|
|
33
33
|
"cssnano": "^7.0.6",
|
|
34
|
-
"mocha": "^10.
|
|
35
|
-
"postcss": "^8.4.
|
|
34
|
+
"mocha": "^10.7.3",
|
|
35
|
+
"postcss": "^8.4.47",
|
|
36
36
|
"postcss-loader": "^8.1.1",
|
|
37
|
-
"postcss-prefix-selector": "^1.16.
|
|
38
|
-
"sass": "^1.
|
|
37
|
+
"postcss-prefix-selector": "^1.16.1",
|
|
38
|
+
"sass": "^1.79.4",
|
|
39
39
|
"style-loader": "^4.0.0",
|
|
40
|
-
"stylelint": "^16.
|
|
40
|
+
"stylelint": "^16.9.0",
|
|
41
41
|
"stylelint-config-prettier-scss": "^1.0.0",
|
|
42
|
-
"stylelint-config-standard-scss": "^13.
|
|
43
|
-
"stylelint-scss": "^6.
|
|
44
|
-
"vite": "^5.
|
|
45
|
-
"vitepress": "^1.
|
|
42
|
+
"stylelint-config-standard-scss": "^13.1.0",
|
|
43
|
+
"stylelint-scss": "^6.7.0",
|
|
44
|
+
"vite": "^5.4.8",
|
|
45
|
+
"vitepress": "^1.3.4"
|
|
46
46
|
},
|
|
47
47
|
"repository": {
|
|
48
48
|
"type": "git",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use "sass:color" as color;
|
|
1
2
|
@use "../functions/colors" as color-functions;
|
|
2
3
|
|
|
3
4
|
// Material colors by Bootstrap
|
|
@@ -79,102 +80,102 @@ $color-contrast-dark: $black !default;
|
|
|
79
80
|
$color-contrast-light: $white !default;
|
|
80
81
|
|
|
81
82
|
// fusv-disable
|
|
82
|
-
$blue-100: color
|
|
83
|
-
$blue-200: color
|
|
84
|
-
$blue-300: color
|
|
85
|
-
$blue-400: color
|
|
83
|
+
$blue-100: color.scale($blue, $lightness: 80%) !default;
|
|
84
|
+
$blue-200: color.scale($blue, $lightness: 60%) !default;
|
|
85
|
+
$blue-300: color.scale($blue, $lightness: 40%) !default;
|
|
86
|
+
$blue-400: color.scale($blue, $lightness: 20%) !default;
|
|
86
87
|
$blue-500: $blue !default;
|
|
87
|
-
$blue-600: color
|
|
88
|
-
$blue-700: color
|
|
89
|
-
$blue-800: color
|
|
90
|
-
$blue-900: color
|
|
91
|
-
|
|
92
|
-
$indigo-100: color
|
|
93
|
-
$indigo-200: color
|
|
94
|
-
$indigo-300: color
|
|
95
|
-
$indigo-400: color
|
|
88
|
+
$blue-600: color.scale($blue, $lightness: -20%) !default;
|
|
89
|
+
$blue-700: color.scale($blue, $lightness: -40%) !default;
|
|
90
|
+
$blue-800: color.scale($blue, $lightness: -60%) !default;
|
|
91
|
+
$blue-900: color.scale($blue, $lightness: -80%) !default;
|
|
92
|
+
|
|
93
|
+
$indigo-100: color.scale($indigo, $lightness: 80%) !default;
|
|
94
|
+
$indigo-200: color.scale($indigo, $lightness: 60%) !default;
|
|
95
|
+
$indigo-300: color.scale($indigo, $lightness: 40%) !default;
|
|
96
|
+
$indigo-400: color.scale($indigo, $lightness: 20%) !default;
|
|
96
97
|
$indigo-500: $indigo !default;
|
|
97
|
-
$indigo-600: color
|
|
98
|
-
$indigo-700: color
|
|
99
|
-
$indigo-800: color
|
|
100
|
-
$indigo-900: color
|
|
101
|
-
|
|
102
|
-
$purple-100: color
|
|
103
|
-
$purple-200: color
|
|
104
|
-
$purple-300: color
|
|
105
|
-
$purple-400: color
|
|
98
|
+
$indigo-600: color.scale($indigo, $lightness: -20%) !default;
|
|
99
|
+
$indigo-700: color.scale($indigo, $lightness: -40%) !default;
|
|
100
|
+
$indigo-800: color.scale($indigo, $lightness: -60%) !default;
|
|
101
|
+
$indigo-900: color.scale($indigo, $lightness: -80%) !default;
|
|
102
|
+
|
|
103
|
+
$purple-100: color.scale($purple, $lightness: 80%) !default;
|
|
104
|
+
$purple-200: color.scale($purple, $lightness: 60%) !default;
|
|
105
|
+
$purple-300: color.scale($purple, $lightness: 40%) !default;
|
|
106
|
+
$purple-400: color.scale($purple, $lightness: 20%) !default;
|
|
106
107
|
$purple-500: $purple !default;
|
|
107
|
-
$purple-600: color
|
|
108
|
-
$purple-700: color
|
|
109
|
-
$purple-800: color
|
|
110
|
-
$purple-900: color
|
|
111
|
-
|
|
112
|
-
$pink-100: color
|
|
113
|
-
$pink-200: color
|
|
114
|
-
$pink-300: color
|
|
115
|
-
$pink-400: color
|
|
108
|
+
$purple-600: color.scale($purple, $lightness: -20%) !default;
|
|
109
|
+
$purple-700: color.scale($purple, $lightness: -40%) !default;
|
|
110
|
+
$purple-800: color.scale($purple, $lightness: -60%) !default;
|
|
111
|
+
$purple-900: color.scale($purple, $lightness: -80%) !default;
|
|
112
|
+
|
|
113
|
+
$pink-100: color.scale($pink, $lightness: 80%) !default;
|
|
114
|
+
$pink-200: color.scale($pink, $lightness: 60%) !default;
|
|
115
|
+
$pink-300: color.scale($pink, $lightness: 40%) !default;
|
|
116
|
+
$pink-400: color.scale($pink, $lightness: 20%) !default;
|
|
116
117
|
$pink-500: $pink !default;
|
|
117
|
-
$pink-600: color
|
|
118
|
-
$pink-700: color
|
|
119
|
-
$pink-800: color
|
|
120
|
-
$pink-900: color
|
|
121
|
-
|
|
122
|
-
$red-100: color
|
|
123
|
-
$red-200: color
|
|
124
|
-
$red-300: color
|
|
125
|
-
$red-400: color
|
|
118
|
+
$pink-600: color.scale($pink, $lightness: -20%) !default;
|
|
119
|
+
$pink-700: color.scale($pink, $lightness: -40%) !default;
|
|
120
|
+
$pink-800: color.scale($pink, $lightness: -60%) !default;
|
|
121
|
+
$pink-900: color.scale($pink, $lightness: -80%) !default;
|
|
122
|
+
|
|
123
|
+
$red-100: color.scale($red, $lightness: 80%) !default;
|
|
124
|
+
$red-200: color.scale($red, $lightness: 60%) !default;
|
|
125
|
+
$red-300: color.scale($red, $lightness: 40%) !default;
|
|
126
|
+
$red-400: color.scale($red, $lightness: 20%) !default;
|
|
126
127
|
$red-500: $red !default;
|
|
127
|
-
$red-600: color
|
|
128
|
-
$red-700: color
|
|
129
|
-
$red-800: color
|
|
130
|
-
$red-900: color
|
|
131
|
-
|
|
132
|
-
$orange-100: color
|
|
133
|
-
$orange-200: color
|
|
134
|
-
$orange-300: color
|
|
135
|
-
$orange-400: color
|
|
128
|
+
$red-600: color.scale($red, $lightness: -20%) !default;
|
|
129
|
+
$red-700: color.scale($red, $lightness: -40%) !default;
|
|
130
|
+
$red-800: color.scale($red, $lightness: -60%) !default;
|
|
131
|
+
$red-900: color.scale($red, $lightness: -80%) !default;
|
|
132
|
+
|
|
133
|
+
$orange-100: color.scale($orange, $lightness: 80%) !default;
|
|
134
|
+
$orange-200: color.scale($orange, $lightness: 60%) !default;
|
|
135
|
+
$orange-300: color.scale($orange, $lightness: 40%) !default;
|
|
136
|
+
$orange-400: color.scale($orange, $lightness: 20%) !default;
|
|
136
137
|
$orange-500: $orange !default;
|
|
137
|
-
$orange-600: color
|
|
138
|
-
$orange-700: color
|
|
139
|
-
$orange-800: color
|
|
140
|
-
$orange-900: color
|
|
141
|
-
|
|
142
|
-
$yellow-100: color
|
|
143
|
-
$yellow-200: color
|
|
144
|
-
$yellow-300: color
|
|
145
|
-
$yellow-400: color
|
|
138
|
+
$orange-600: color.scale($orange, $lightness: -20%) !default;
|
|
139
|
+
$orange-700: color.scale($orange, $lightness: -40%) !default;
|
|
140
|
+
$orange-800: color.scale($orange, $lightness: -60%) !default;
|
|
141
|
+
$orange-900: color.scale($orange, $lightness: -80%) !default;
|
|
142
|
+
|
|
143
|
+
$yellow-100: color.scale($yellow, $lightness: 80%) !default;
|
|
144
|
+
$yellow-200: color.scale($yellow, $lightness: 60%) !default;
|
|
145
|
+
$yellow-300: color.scale($yellow, $lightness: 40%) !default;
|
|
146
|
+
$yellow-400: color.scale($yellow, $lightness: 20%) !default;
|
|
146
147
|
$yellow-500: $yellow !default;
|
|
147
|
-
$yellow-600: color
|
|
148
|
-
$yellow-700: color
|
|
149
|
-
$yellow-800: color
|
|
150
|
-
$yellow-900: color
|
|
151
|
-
|
|
152
|
-
$green-100: color
|
|
153
|
-
$green-200: color
|
|
154
|
-
$green-300: color
|
|
155
|
-
$green-400: color
|
|
148
|
+
$yellow-600: color.scale($yellow, $lightness: -20%) !default;
|
|
149
|
+
$yellow-700: color.scale($yellow, $lightness: -40%) !default;
|
|
150
|
+
$yellow-800: color.scale($yellow, $lightness: -60%) !default;
|
|
151
|
+
$yellow-900: color.scale($yellow, $lightness: -80%) !default;
|
|
152
|
+
|
|
153
|
+
$green-100: color.scale($green, $lightness: 80%) !default;
|
|
154
|
+
$green-200: color.scale($green, $lightness: 60%) !default;
|
|
155
|
+
$green-300: color.scale($green, $lightness: 40%) !default;
|
|
156
|
+
$green-400: color.scale($green, $lightness: 20%) !default;
|
|
156
157
|
$green-500: $green !default;
|
|
157
|
-
$green-600: color
|
|
158
|
-
$green-700: color
|
|
159
|
-
$green-800: color
|
|
160
|
-
$green-900: color
|
|
161
|
-
|
|
162
|
-
$teal-100: color
|
|
163
|
-
$teal-200: color
|
|
164
|
-
$teal-300: color
|
|
165
|
-
$teal-400: color
|
|
158
|
+
$green-600: color.scale($green, $lightness: -20%) !default;
|
|
159
|
+
$green-700: color.scale($green, $lightness: -40%) !default;
|
|
160
|
+
$green-800: color.scale($green, $lightness: -60%) !default;
|
|
161
|
+
$green-900: color.scale($green, $lightness: -80%) !default;
|
|
162
|
+
|
|
163
|
+
$teal-100: color.scale($teal, $lightness: 80%) !default;
|
|
164
|
+
$teal-200: color.scale($teal, $lightness: 60%) !default;
|
|
165
|
+
$teal-300: color.scale($teal, $lightness: 40%) !default;
|
|
166
|
+
$teal-400: color.scale($teal, $lightness: 20%) !default;
|
|
166
167
|
$teal-500: $teal !default;
|
|
167
|
-
$teal-600: color
|
|
168
|
-
$teal-700: color
|
|
169
|
-
$teal-800: color
|
|
170
|
-
$teal-900: color
|
|
171
|
-
|
|
172
|
-
$cyan-100: color
|
|
173
|
-
$cyan-200: color
|
|
174
|
-
$cyan-300: color
|
|
175
|
-
$cyan-400: color
|
|
168
|
+
$teal-600: color.scale($teal, $lightness: -20%) !default;
|
|
169
|
+
$teal-700: color.scale($teal, $lightness: -40%) !default;
|
|
170
|
+
$teal-800: color.scale($teal, $lightness: -60%) !default;
|
|
171
|
+
$teal-900: color.scale($teal, $lightness: -80%) !default;
|
|
172
|
+
|
|
173
|
+
$cyan-100: color.scale($cyan, $lightness: 80%) !default;
|
|
174
|
+
$cyan-200: color.scale($cyan, $lightness: 60%) !default;
|
|
175
|
+
$cyan-300: color.scale($cyan, $lightness: 40%) !default;
|
|
176
|
+
$cyan-400: color.scale($cyan, $lightness: 20%) !default;
|
|
176
177
|
$cyan-500: $cyan !default;
|
|
177
|
-
$cyan-600: color
|
|
178
|
-
$cyan-700: color
|
|
179
|
-
$cyan-800: color
|
|
180
|
-
$cyan-900: color
|
|
178
|
+
$cyan-600: color.scale($cyan, $lightness: -20%) !default;
|
|
179
|
+
$cyan-700: color.scale($cyan, $lightness: -40%) !default;
|
|
180
|
+
$cyan-800: color.scale($cyan, $lightness: -60%) !default;
|
|
181
|
+
$cyan-900: color.scale($cyan, $lightness: -80%) !default;
|
package/src/colors/_customs.scss
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
|
+
@use "sass:color" as color;
|
|
1
2
|
@use "../functions/colors" as color-functions;
|
|
2
3
|
|
|
3
4
|
$flatrica-green: #06a763 !default;
|
|
4
5
|
$manga-red: #d41816 !default;
|
|
5
6
|
|
|
6
|
-
$flatrica-green-100: color
|
|
7
|
-
$flatrica-green-200: color
|
|
8
|
-
$flatrica-green-300: color
|
|
9
|
-
$flatrica-green-400: color
|
|
7
|
+
$flatrica-green-100: color.scale($flatrica-green, $lightness: 20%);
|
|
8
|
+
$flatrica-green-200: color.scale($flatrica-green, $lightness: 40%);
|
|
9
|
+
$flatrica-green-300: color.scale($flatrica-green, $lightness: 60%);
|
|
10
|
+
$flatrica-green-400: color.scale($flatrica-green, $lightness: 80%);
|
|
10
11
|
$flatrica-green-500: $flatrica-green;
|
|
11
|
-
$flatrica-green-600: color
|
|
12
|
-
$flatrica-green-700: color
|
|
13
|
-
$flatrica-green-800: color
|
|
14
|
-
$flatrica-green-900: color
|
|
12
|
+
$flatrica-green-600: color.scale($flatrica-green, $lightness: -20%);
|
|
13
|
+
$flatrica-green-700: color.scale($flatrica-green, $lightness: -40%);
|
|
14
|
+
$flatrica-green-800: color.scale($flatrica-green, $lightness: -60%);
|
|
15
|
+
$flatrica-green-900: color.scale($flatrica-green, $lightness: -80%);
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
$manga-red-
|
|
18
|
-
$manga-red-
|
|
19
|
-
$manga-red-
|
|
17
|
+
|
|
18
|
+
$manga-red-100: color.scale($manga-red, $lightness: 20%);
|
|
19
|
+
$manga-red-200: color.scale($manga-red, $lightness: 40%);
|
|
20
|
+
$manga-red-300: color.scale($manga-red, $lightness: 60%);
|
|
21
|
+
$manga-red-400: color.scale($manga-red, $lightness: 80%);
|
|
20
22
|
$manga-red-500: $manga-red;
|
|
21
|
-
$manga-red-600: color
|
|
22
|
-
$manga-red-700: color
|
|
23
|
-
$manga-red-800: color
|
|
24
|
-
$manga-red-900: color
|
|
23
|
+
$manga-red-600: color.scale($manga-red, $lightness: -20%);
|
|
24
|
+
$manga-red-700: color.scale($manga-red, $lightness: -40%);
|
|
25
|
+
$manga-red-800: color.scale($manga-red, $lightness: -60%);
|
|
26
|
+
$manga-red-900: color.scale($manga-red, $lightness: -80%);
|
|
25
27
|
|
|
26
28
|
$colors-collection: (
|
|
27
29
|
"core": (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use "sass:math";
|
|
3
|
-
@use "sass:string";
|
|
1
|
+
@use "sass:color" as color;
|
|
2
|
+
@use "sass:math" as math;
|
|
3
|
+
@use "sass:string" as string;
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Return opaque color
|
|
@@ -8,34 +8,15 @@
|
|
|
8
8
|
* function credited to https://getbootstrap.com/
|
|
9
9
|
*/
|
|
10
10
|
@function color-opaque($background, $foreground) {
|
|
11
|
-
@return mix(rgba($foreground, 1), $background, opacity($foreground) * 100
|
|
11
|
+
@return color.mix(rgba($foreground, 1), $background, opacity($foreground) * 100%, $method: rgb);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Tint a color: mix a color with white
|
|
17
|
-
* function credited to https://getbootstrap.com/
|
|
18
|
-
*/
|
|
19
|
-
@function color-tint($color, $weight) {
|
|
20
|
-
@return mix(white, $color, $weight);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Shade a color: mix a color with black
|
|
26
|
-
* function credited to https://getbootstrap.com/
|
|
27
|
-
*/
|
|
28
|
-
@function color-shade($color, $weight) {
|
|
29
|
-
@return mix(black, $color, $weight);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
14
|
/**
|
|
34
15
|
* Shade the color if the weight is positive, else tint it
|
|
35
16
|
* function credited to https://getbootstrap.com/
|
|
36
17
|
*/
|
|
37
18
|
@function color-shift($color, $weight) {
|
|
38
|
-
@return if($weight > 0, color
|
|
19
|
+
@return if($weight > 0, color.scale($color, $lightness: $weight), color.scale($color, $lightness: -$weight));
|
|
39
20
|
}
|
|
40
21
|
|
|
41
22
|
|
|
@@ -64,7 +45,11 @@
|
|
|
64
45
|
@if $color == transparent or type-of($color) != color {
|
|
65
46
|
@return 100;
|
|
66
47
|
}
|
|
67
|
-
@return math.div((
|
|
48
|
+
@return math.div((
|
|
49
|
+
(color.channel($color, "red", $space: rgb) * .299) +
|
|
50
|
+
(color.channel($color, "green", $space: rgb) * .587) +
|
|
51
|
+
(color.channel($color, "blue", $space: rgb) * .114)
|
|
52
|
+
), 255 * 100%);
|
|
68
53
|
}
|
|
69
54
|
|
|
70
55
|
/**
|
|
@@ -92,26 +77,32 @@
|
|
|
92
77
|
}
|
|
93
78
|
$alpha: alpha($color);
|
|
94
79
|
@if $mode == 1 or ($mode == 2 and $alpha == 1) {
|
|
95
|
-
@return
|
|
80
|
+
@return color.channel($color, "red", $space: rgb) +
|
|
81
|
+
$delimiter + color.channel($color, "green", $space: rgb) +
|
|
82
|
+
$delimiter + color.channel($color, "blue", $space: rgb);
|
|
96
83
|
}
|
|
97
84
|
// Regular RGBA compliant result ("number" notation)
|
|
98
|
-
@return
|
|
85
|
+
@return color.channel($color, "red", $space: rgb) +
|
|
86
|
+
$delimiter + color.channel($color, "green", $space: rgb) +
|
|
87
|
+
$delimiter + color.channel($color, "blue", $space: rgb) +
|
|
88
|
+
$delimiter-alpha + color.channel($color, "alpha"); // * 100%
|
|
99
89
|
}
|
|
100
90
|
|
|
101
91
|
/**
|
|
102
92
|
* Create default collection
|
|
103
93
|
*/
|
|
94
|
+
// TODO CHECK
|
|
104
95
|
@function create-collection($color){
|
|
105
96
|
$list: (
|
|
106
|
-
"100": color
|
|
107
|
-
"200": color
|
|
108
|
-
"300": color
|
|
109
|
-
"400": color
|
|
97
|
+
"100": color.scale($color, $lightness: 80%),
|
|
98
|
+
"200": color.scale($color, $lightness: 60%),
|
|
99
|
+
"300": color.scale($color, $lightness: 40%),
|
|
100
|
+
"400": color.scale($color, $lightness: 20%),
|
|
110
101
|
"500": $color,
|
|
111
|
-
"600": color
|
|
112
|
-
"700": color
|
|
113
|
-
"800": color
|
|
114
|
-
"900": color
|
|
102
|
+
"600": color.scale($color, $lightness: -20%),
|
|
103
|
+
"700": color.scale($color, $lightness: -40%),
|
|
104
|
+
"800": color.scale($color, $lightness: -60%),
|
|
105
|
+
"900": color.scale($color, $lightness: -80%)
|
|
115
106
|
);
|
|
116
107
|
|
|
117
108
|
@return $list
|
package/test/compile.test.js
CHANGED
|
@@ -31,13 +31,13 @@ describe("COMPILE", function() {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
it('Check some rules', function() {
|
|
34
|
-
// --
|
|
34
|
+
// -- TODO
|
|
35
35
|
expect(cssCompiled).to.contain('.blue-400-text {');
|
|
36
|
-
expect(cssCompiled).to.contain('color:
|
|
37
|
-
expect(cssCompiled).to.contain('.blue-
|
|
38
|
-
expect(cssCompiled).to.contain('background: #
|
|
36
|
+
expect(cssCompiled).to.contain('color: rgb(61.4, 139, 253.4) !important');
|
|
37
|
+
expect(cssCompiled).to.contain('.blue-500-bg {');
|
|
38
|
+
expect(cssCompiled).to.contain('background: #0d6efd !important');
|
|
39
39
|
// --
|
|
40
|
-
expect(cssCompiled).to.contain('--blue-400: 61 139 253;');
|
|
40
|
+
expect(cssCompiled).to.contain('--blue-400: 61.4 139 253.4;');
|
|
41
41
|
expect(cssCompiled).to.contain('--manga-red-500: 212 24 22;');
|
|
42
42
|
expect(cssCompiled).to.contain('--advanced-brand-instagram: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);');
|
|
43
43
|
expect(cssCompiled).to.contain('.mt-auto {');
|
|
@@ -58,18 +58,12 @@ describe("COMPILE", function() {
|
|
|
58
58
|
expect(cssCompiled).to.contain('@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {');
|
|
59
59
|
expect(cssCompiled).to.contain('@supports (-ms-ime-align: auto) {');
|
|
60
60
|
expect(cssCompiled).to.contain('@supports (-moz-appearance: none) {');
|
|
61
|
-
// --
|
|
61
|
+
// -- RGB or hex based on color precision. Use sass:color hex or rgb to be sure
|
|
62
62
|
expect(cssCompiled).to.contain('--color-opaque-1: #111111;');
|
|
63
|
-
expect(cssCompiled).to.contain('--color-opaque-2:
|
|
64
|
-
// --
|
|
65
|
-
expect(cssCompiled).to.contain('--color-tint-1: #595959;');
|
|
66
|
-
expect(cssCompiled).to.contain('--color-tint-2: #e6e6e6;');
|
|
67
|
-
// --
|
|
68
|
-
expect(cssCompiled).to.contain('--color-shade-1: #1a1a1a;');
|
|
69
|
-
expect(cssCompiled).to.contain('--color-shade-2: #a6a6a6;');
|
|
63
|
+
expect(cssCompiled).to.contain('--color-opaque-2: rgb(110.5, 110.5, 110.5);');
|
|
70
64
|
// --
|
|
71
|
-
expect(cssCompiled).to.contain('--color-shift-1:
|
|
72
|
-
expect(cssCompiled).to.contain('--color-shift-2:
|
|
65
|
+
expect(cssCompiled).to.contain('--color-shift-1: rgb(89.25, 89.25, 89.25);');
|
|
66
|
+
expect(cssCompiled).to.contain('--color-shift-2: rgb(229.5, 229.5, 229.5);');
|
|
73
67
|
// --
|
|
74
68
|
expect(cssCompiled).to.contain('--color-contrast-1: #fff;');
|
|
75
69
|
expect(cssCompiled).to.contain('--color-contrast-2: #000;');
|