claritas-web-framework 5.1.21 → 5.1.22

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.
Files changed (85) hide show
  1. package/.eslintrc.js +21 -0
  2. package/.prettierrc +7 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.html +1 -1
  5. package/index.html +9 -15
  6. package/index.js +2 -2
  7. package/js/defaults/getPage.js +4 -4
  8. package/js/defaults/getSiblings.js +5 -3
  9. package/js/polyfills/customevent.js +21 -16
  10. package/js/utilities/{debounce.js → DeBounce.js} +25 -27
  11. package/js/utilities/isElement.js +11 -11
  12. package/js/utilities/removehash.js +12 -8
  13. package/package.json +12 -6
  14. package/postcss.config.js +42 -46
  15. package/scss/_base.scss +1 -1
  16. package/scss/_functions.scss +51 -14
  17. package/scss/_helpers.scss +1 -1
  18. package/scss/_mixins.scss +1 -1
  19. package/scss/_modules.scss +1 -1
  20. package/scss/_root.scss +1 -1
  21. package/scss/_utilities.scss +1 -1
  22. package/scss/_variables.scss +213 -217
  23. package/scss/helpers/_image.scss +1 -1
  24. package/scss/helpers/_link.scss +2 -2
  25. package/scss/helpers/_wrap.scss +1 -1
  26. package/scss/index.scss +1 -1
  27. package/scss/mixins/_breakpoints.scss +1 -1
  28. package/scss/mixins/_wrap.scss +1 -1
  29. package/scss/modules/_close.scss +1 -1
  30. package/scss/modules/_details.scss +2 -2
  31. package/scss/modules/_tag.scss +1 -1
  32. package/scss/utilities/_colors.scss +1 -1
  33. package/scss/utilities/_order.scss +1 -1
  34. package/scss/utilities/_pointerEvents.scss +1 -1
  35. package/scss/utilities/_size.scss +2 -2
  36. package/scss/utilities/_translate.scss +1 -1
  37. package/scss/utilities/_visibility.scss +1 -1
  38. package/scss/utilities/_zIndex.scss +1 -1
  39. package/styles/helpers/container.css +1 -1
  40. package/styles/helpers/embed.css +5 -5
  41. package/styles/helpers/grid.css +5 -5
  42. package/styles/helpers/image.css +1 -1
  43. package/styles/helpers/link.css +2 -2
  44. package/styles/helpers/wrap.css +1 -1
  45. package/styles/helpers.css +7 -7
  46. package/styles/index.css +6 -6
  47. package/styles/mixins/caret.css +1 -1
  48. package/styles/mixins/helpers/container.css +1 -1
  49. package/styles/mixins/helpers/link.css +2 -2
  50. package/styles/mixins/modules/card.css +1 -1
  51. package/styles/mixins/modules/close.css +2 -2
  52. package/styles/mixins/modules/pill.css +1 -1
  53. package/styles/mixins.css +13 -13
  54. package/styles/modules/breadcrumbs.css +2 -2
  55. package/styles/modules/button.css +2 -2
  56. package/styles/modules/card.css +2 -2
  57. package/styles/modules/close.css +1 -1
  58. package/styles/modules/details.css +2 -2
  59. package/styles/modules/dialog.css +1 -1
  60. package/styles/modules/dropdown.css +2 -2
  61. package/styles/modules/form/checkbox.css +4 -4
  62. package/styles/modules/form/file.css +7 -7
  63. package/styles/modules/form/progress.css +1 -1
  64. package/styles/modules/form/radio.css +3 -3
  65. package/styles/modules/form/range.css +4 -3
  66. package/styles/modules/form/select.css +3 -2
  67. package/styles/modules/form.css +0 -2
  68. package/styles/modules/list.css +4 -4
  69. package/styles/modules/pill.css +2 -2
  70. package/styles/modules/table.css +1 -1
  71. package/styles/modules/tabs.css +5 -5
  72. package/styles/modules/tag.css +4 -3
  73. package/styles/modules/tile.css +1 -1
  74. package/styles/modules.css +17 -17
  75. package/styles/utilities/align.css +1 -1
  76. package/styles/utilities/pointer-events.css +1 -1
  77. package/styles/utilities/position.css +9 -9
  78. package/styles/utilities/shadow.css +4 -2
  79. package/styles/utilities/size.css +24 -24
  80. package/styles/utilities/spacing.css +10 -10
  81. package/styles/utilities/tooltip.css +4 -4
  82. package/styles/utilities/translate.css +1 -1
  83. package/styles/utilities.css +18 -18
  84. package/styles/vars.css +6 -6
  85. package/webpack.config.js +41 -41
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Claritas Web Framework</title><script defer="defer" src="index.js"></script><link href="./index.css" rel="stylesheet"></head><body></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Claritas Web Framework</title><script defer="defer" src="index.js"></script><link href="./index.css" rel="stylesheet"></head><body></body></html>
package/index.html CHANGED
@@ -1,17 +1,11 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
- <title>
9
- <%= htmlWebpackPlugin.options.title %>
10
- </title>
11
- </head>
12
-
13
- <body>
14
-
15
- </body>
16
-
17
- </html>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title><%= htmlWebpackPlugin.options.title %></title>
8
+ </head>
9
+
10
+ <body></body>
11
+ </html>
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- // Import CSS
2
- import './scss/index.scss';
1
+ // Import CSS
2
+ import "./scss/index.scss";
@@ -1,4 +1,4 @@
1
- export default String.prototype.getPage = function () {
2
- const urlArray = this.split('/');
3
- return urlArray[urlArray.length - 1].split('?')[0];
4
- };
1
+ export default String.prototype.getPage = function () {
2
+ const urlArray = this.split("/");
3
+ return urlArray[urlArray.length - 1].split("?")[0];
4
+ };
@@ -1,3 +1,5 @@
1
- export default Node.prototype.getSiblings = function () {
2
- return Array.from(this.parentNode.children).filter(sibling => sibling !== this);
3
- };
1
+ export default Node.prototype.getSiblings = function () {
2
+ return Array.from(this.parentNode.children).filter(
3
+ (sibling) => sibling !== this
4
+ );
5
+ };
@@ -1,16 +1,21 @@
1
- (function () {
2
- 'use strict';
3
-
4
- if (typeof window.CustomEvent === 'function') return false; //If not IE
5
-
6
- function CustomEvent(event, params) {
7
- params = params || { bubbles: false, cancelable: false, detail: undefined };
8
- var evt = document.createEvent('CustomEvent');
9
- evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
10
- return evt;
11
- }
12
-
13
- CustomEvent.prototype = window.Event.prototype;
14
-
15
- window.Event = CustomEvent;
16
- })();
1
+ (function () {
2
+ "use strict";
3
+
4
+ if (typeof window.CustomEvent === "function") return false; //If not IE
5
+
6
+ function CustomEvent(event, params) {
7
+ params = params || { bubbles: false, cancelable: false, detail: undefined };
8
+ var evt = document.createEvent("CustomEvent");
9
+ evt.initCustomEvent(
10
+ event,
11
+ params.bubbles,
12
+ params.cancelable,
13
+ params.detail
14
+ );
15
+ return evt;
16
+ }
17
+
18
+ CustomEvent.prototype = window.Event.prototype;
19
+
20
+ window.Event = CustomEvent;
21
+ })();
@@ -1,27 +1,25 @@
1
- /**
2
- * Debounce functions for better performance
3
- * @param {Function} fn The function to debounce
4
- */
5
- export function debounce(fn) {
6
- 'use strict';
7
-
8
- // Setup a timer
9
- let timeout;
10
-
11
- // Return a function to run debounced
12
- return () => {
13
-
14
- // Setup the arguments
15
- let context = this;
16
- let args = arguments;
17
-
18
- // If there's a timer, cancel it
19
- if (timeout) {
20
- window.cancelAnimationFrame(timeout);
21
- }
22
-
23
- // Setup the new requestAnimationFrame()
24
- timeout = window.requestAnimationFrame(() => fn.apply(context, args));
25
- };
26
-
27
- }
1
+ /**
2
+ * Debounce functions for better performance
3
+ * @param {Function} fn The function to debounce
4
+ */
5
+ export function DeBounce(fn) {
6
+ "use strict";
7
+
8
+ // Setup a timer
9
+ let timeout;
10
+
11
+ // Return a function to run debounced
12
+ return () => {
13
+ // Setup the arguments
14
+ let context = this;
15
+ let args = arguments;
16
+
17
+ // If there's a timer, cancel it
18
+ if (timeout) {
19
+ window.cancelAnimationFrame(timeout);
20
+ }
21
+
22
+ // Setup the new requestAnimationFrame()
23
+ timeout = window.requestAnimationFrame(() => fn.apply(context, args));
24
+ };
25
+ }
@@ -1,11 +1,11 @@
1
- /**
2
- * @desc Checks if an element exists in the DOM
3
- * @param {Element} element The element to check
4
- * @return {Boolean} The outcome of the check
5
- * @example isElement('#myElement');
6
- */
7
- export function isElement(element) {
8
- 'use strict';
9
-
10
- return document.body.contains(document.querySelector(element)) ? true : false;
11
- }
1
+ /**
2
+ * @desc Checks if an element exists in the DOM
3
+ * @param {Element} element The element to check
4
+ * @return {Boolean} The outcome of the check
5
+ * @example isElement('#myElement');
6
+ */
7
+ export function isElement(element) {
8
+ "use strict";
9
+
10
+ return document.body.contains(document.querySelector(element)) ? true : false;
11
+ }
@@ -1,8 +1,12 @@
1
- /**
2
- * @desc Removes the hash from the page url.
3
- */
4
- export function removeHash() {
5
- 'use strict';
6
-
7
- return history.pushState('', document.title, window.location.pathname + window.location.search);
8
- }
1
+ /**
2
+ * @desc Removes the hash from the page url.
3
+ */
4
+ export function removeHash() {
5
+ "use strict";
6
+
7
+ return history.pushState(
8
+ "",
9
+ document.title,
10
+ window.location.pathname + window.location.search
11
+ );
12
+ }
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "claritas-web-framework",
3
- "version": "5.1.21",
4
- "updated": "29/04/2022",
3
+ "version": "5.1.22",
4
+ "updated": "11/05/2022",
5
5
  "description": "The CSS framework built for Claritas front end.",
6
6
  "main": "index.js",
7
7
  "scripts": {
8
8
  "build": "webpack --config webpack.config.js --mode production",
9
- "start": "webpack serve --config webpack.config.js --mode development"
9
+ "start": "webpack serve --config webpack.config.js --mode development",
10
+ "lint": "eslint . --fix"
10
11
  },
11
12
  "repository": {
12
13
  "type": "git",
@@ -16,8 +17,12 @@
16
17
  "license": "ISC",
17
18
  "devDependencies": {
18
19
  "@alexlafroscia/postcss-color-mod-function": "^4.0.0",
20
+ "@babel/eslint-plugin": "^7.17.7",
19
21
  "css-loader": "^6.7.1",
20
22
  "cssnano": "^5.1.7",
23
+ "eslint": "^8.15.0",
24
+ "eslint-config-prettier": "^8.5.0",
25
+ "eslint-plugin-prettier": "^4.0.0",
21
26
  "html-webpack-plugin": "^5.5.0",
22
27
  "mini-css-extract-plugin": "^2.6.0",
23
28
  "postcss": "^8.4.13",
@@ -27,10 +32,11 @@
27
32
  "postcss-loader": "^6.2.1",
28
33
  "postcss-preset-env": "^7.5.0",
29
34
  "postcss-scss": "^4.0.4",
35
+ "prettier": "^2.6.2",
30
36
  "sass": "^1.51.0",
31
37
  "sass-loader": "^12.6.0",
32
- "webpack": "^5.72.0",
38
+ "webpack": "^5.72.1",
33
39
  "webpack-cli": "^4.9.2",
34
- "webpack-dev-server": "^4.8.1"
40
+ "webpack-dev-server": "^4.9.0"
35
41
  }
36
- }
42
+ }
package/postcss.config.js CHANGED
@@ -1,46 +1,42 @@
1
- const postcssImport = require("postcss-import");
2
- const postcssAdvancedVar = require("postcss-advanced-variables");
3
- const postcssPresetEnv = require("postcss-preset-env");
4
- const postcssColorMod = require("@alexlafroscia/postcss-color-mod-function");
5
- const postcssInlineSvg = require("postcss-inline-svg");
6
- const cssNano = require("cssnano");
7
-
8
- module.exports = {
9
- plugins: [
10
- postcssImport({}),
11
- postcssAdvancedVar({
12
- disable: '@import'
13
- }),
14
- postcssColorMod({
15
- importFrom: [
16
- "./styles/vars.css",
17
- ],
18
- unresolved: "warn"
19
- }),
20
- postcssPresetEnv({
21
- stage: 0
22
- }),
23
- postcssInlineSvg({
24
- paths: [
25
- "./images/"
26
- ],
27
- removeFill: true,
28
- removeStroke: true
29
- }),
30
- cssNano({
31
- preset: [
32
- "default",
33
- {
34
- discardComments: {
35
- removeAll: true
36
- },
37
- autoprefixer: true,
38
- colorMin: false,
39
- mergeLonghand: false,
40
- mergeRules: false,
41
- minifySelectors: false
42
- }
43
- ]
44
- })
45
- ]
46
- }
1
+ const postcssImport = require("postcss-import");
2
+ const postcssAdvancedVar = require("postcss-advanced-variables");
3
+ const postcssPresetEnv = require("postcss-preset-env");
4
+ const postcssColorMod = require("@alexlafroscia/postcss-color-mod-function");
5
+ const postcssInlineSvg = require("postcss-inline-svg");
6
+ const cssNano = require("cssnano");
7
+
8
+ module.exports = {
9
+ plugins: [
10
+ postcssImport({}),
11
+ postcssAdvancedVar({
12
+ disable: "@import",
13
+ }),
14
+ postcssColorMod({
15
+ importFrom: ["./styles/vars.css"],
16
+ unresolved: "warn",
17
+ }),
18
+ postcssPresetEnv({
19
+ stage: 0,
20
+ }),
21
+ postcssInlineSvg({
22
+ paths: ["./images/"],
23
+ removeFill: true,
24
+ removeStroke: true,
25
+ }),
26
+ cssNano({
27
+ preset: [
28
+ "default",
29
+ {
30
+ discardComments: {
31
+ removeAll: true,
32
+ },
33
+ autoprefixer: true,
34
+ colorMin: false,
35
+ mergeLonghand: false,
36
+ mergeRules: false,
37
+ minifySelectors: false,
38
+ },
39
+ ],
40
+ }),
41
+ ],
42
+ };
package/scss/_base.scss CHANGED
@@ -1,3 +1,3 @@
1
1
  @import "functions";
2
2
  @import "variables";
3
- @import "mixins";
3
+ @import "mixins";
@@ -41,7 +41,8 @@
41
41
  @function rgba-css-var($identifier, $target) {
42
42
  @if $identifier == "body" and $target == "bg" {
43
43
  @return rgba(var(--#{$identifier}-bg-rgb), var(--#{$target}-opacity));
44
- } @if $identifier == "body" and $target == "text" {
44
+ }
45
+ @if $identifier == "body" and $target == "text" {
45
46
  @return rgba(var(--#{$identifier}-color-rgb), var(--#{$target}-opacity));
46
47
  } @else {
47
48
  @return rgba(var(--#{$identifier}-rgb), var(--#{$target}-opacity));
@@ -58,7 +59,12 @@
58
59
  $_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg)));
59
60
  }
60
61
 
61
- $_map: map-merge($_map, ($key: call(get-function($func), $_args...)));
62
+ $_map: map-merge(
63
+ $_map,
64
+ (
65
+ $key: call(get-function($func), $_args...),
66
+ )
67
+ );
62
68
  }
63
69
 
64
70
  @return $_map;
@@ -90,7 +96,12 @@
90
96
  $result: ();
91
97
  @each $key, $value in $map {
92
98
  @if (index($values, $key) != null) {
93
- $result: map-merge($result, ($key: $value));
99
+ $result: map-merge(
100
+ $result,
101
+ (
102
+ $key: $value,
103
+ )
104
+ );
94
105
  }
95
106
  }
96
107
  @return $result;
@@ -118,7 +129,8 @@
118
129
  $index: str-index($string, $search);
119
130
 
120
131
  @if $index {
121
- @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
132
+ @return str-slice($string, 1, $index - 1) + $replace +
133
+ str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
122
134
  }
123
135
 
124
136
  @return $string;
@@ -148,9 +160,29 @@
148
160
 
149
161
  // A list of pre-calculated numbers of pow(divide((divide($value, 255) + .055), 1.055), 2.4). (from 0 to 255)
150
162
  // stylelint-disable-next-line scss/dollar-variable-default, scss/dollar-variable-pattern
151
- $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
152
-
153
- @function color-contrast($background, $color-contrast-dark: $color-contrast-dark, $color-contrast-light: $color-contrast-light, $min-contrast-ratio: $min-contrast-ratio) {
163
+ $_luminance-list: 0.0008 0.001 0.0011 0.0013 0.0015 0.0017 0.002 0.0022 0.0025 0.0027 0.003 0.0033 0.0037 0.004 0.0044
164
+ 0.0048 0.0052 0.0056 0.006 0.0065 0.007 0.0075 0.008 0.0086 0.0091 0.0097 0.0103 0.011 0.0116 0.0123 0.013 0.0137
165
+ 0.0144 0.0152 0.016 0.0168 0.0176 0.0185 0.0194 0.0203 0.0212 0.0222 0.0232 0.0242 0.0252 0.0262 0.0273 0.0284 0.0296
166
+ 0.0307 0.0319 0.0331 0.0343 0.0356 0.0369 0.0382 0.0395 0.0409 0.0423 0.0437 0.0452 0.0467 0.0482 0.0497 0.0513 0.0529
167
+ 0.0545 0.0561 0.0578 0.0595 0.0612 0.063 0.0648 0.0666 0.0685 0.0704 0.0723 0.0742 0.0762 0.0782 0.0802 0.0823 0.0844
168
+ 0.0865 0.0887 0.0908 0.0931 0.0953 0.0976 0.0999 0.1022 0.1046 0.107 0.1095 0.1119 0.1144 0.117 0.1195 0.1221 0.1248
169
+ 0.1274 0.1301 0.1329 0.1356 0.1384 0.1413 0.1441 0.147 0.15 0.1529 0.1559 0.159 0.162 0.1651 0.1683 0.1714 0.1746
170
+ 0.1779 0.1812 0.1845 0.1878 0.1912 0.1946 0.1981 0.2016 0.2051 0.2086 0.2122 0.2159 0.2195 0.2232 0.227 0.2307 0.2346
171
+ 0.2384 0.2423 0.2462 0.2502 0.2542 0.2582 0.2623 0.2664 0.2705 0.2747 0.2789 0.2831 0.2874 0.2918 0.2961 0.3005 0.305
172
+ 0.3095 0.314 0.3185 0.3231 0.3278 0.3325 0.3372 0.3419 0.3467 0.3515 0.3564 0.3613 0.3663 0.3712 0.3763 0.3813 0.3864
173
+ 0.3916 0.3968 0.402 0.4072 0.4125 0.4179 0.4233 0.4287 0.4342 0.4397 0.4452 0.4508 0.4564 0.4621 0.4678 0.4735 0.4793
174
+ 0.4851 0.491 0.4969 0.5029 0.5089 0.5149 0.521 0.5271 0.5333 0.5395 0.5457 0.552 0.5583 0.5647 0.5711 0.5776 0.5841
175
+ 0.5906 0.5972 0.6038 0.6105 0.6172 0.624 0.6308 0.6376 0.6445 0.6514 0.6584 0.6654 0.6724 0.6795 0.6867 0.6939 0.7011
176
+ 0.7084 0.7157 0.7231 0.7305 0.7379 0.7454 0.7529 0.7605 0.7682 0.7758 0.7835 0.7913 0.7991 0.807 0.8148 0.8228 0.8308
177
+ 0.8388 0.8469 0.855 0.8632 0.8714 0.8796 0.8879 0.8963 0.9047 0.9131 0.9216 0.9301 0.9387 0.9473 0.956 0.9647 0.9734
178
+ 0.9823 0.9911 1;
179
+
180
+ @function color-contrast(
181
+ $background,
182
+ $color-contrast-dark: $color-contrast-dark,
183
+ $color-contrast-light: $color-contrast-light,
184
+ $min-contrast-ratio: $min-contrast-ratio
185
+ ) {
154
186
  $foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black;
155
187
  $max-ratio: 0;
156
188
  $max-ratio-color: null;
@@ -174,7 +206,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
174
206
  $l1: luminance($background);
175
207
  $l2: luminance(opaque($background, $foreground));
176
208
 
177
- @return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
209
+ @return if($l1 > $l2, divide($l1 + 0.05, $l2 + 0.05), divide($l2 + 0.05, $l1 + 0.05));
178
210
  }
179
211
 
180
212
  // Return WCAG2.0 relative luminance
@@ -184,15 +216,20 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
184
216
  $rgb: (
185
217
  "r": red($color),
186
218
  "g": green($color),
187
- "b": blue($color)
219
+ "b": blue($color),
188
220
  );
189
221
 
190
222
  @each $name, $value in $rgb {
191
- $value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
192
- $rgb: map-merge($rgb, ($name: $value));
223
+ $value: if(divide($value, 255) < 0.03928, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
224
+ $rgb: map-merge(
225
+ $rgb,
226
+ (
227
+ $name: $value,
228
+ )
229
+ );
193
230
  }
194
231
 
195
- @return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
232
+ @return (map-get($rgb, "r") * 0.2126) + (map-get($rgb, "g") * 0.7152) + (map-get($rgb, "b") * 0.0722);
196
233
  }
197
234
 
198
235
  // Return opaque color
@@ -279,7 +316,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
279
316
  $quotient: $quotient + 1;
280
317
  }
281
318
  $result: $result * 10 + $quotient;
282
- $factor: $factor * .1;
319
+ $factor: $factor * 0.1;
283
320
  $remainder: $remainder * 10;
284
321
  $precision: $precision - 1;
285
322
  @if ($precision < 0 and $remainder >= $divisor * 5) {
@@ -293,7 +330,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
293
330
  "px": 1px,
294
331
  "rem": 1rem,
295
332
  "em": 1em,
296
- "%": 1%
333
+ "%": 1%,
297
334
  );
298
335
  @if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
299
336
  $result: $result * map-get($unit-map, $dividend-unit);
@@ -4,4 +4,4 @@
4
4
  @import "./helpers/image";
5
5
  @import "./helpers/link";
6
6
  @import "./helpers/screenReaders";
7
- @import "./helpers/wrap";
7
+ @import "./helpers/wrap";
package/scss/_mixins.scss CHANGED
@@ -12,4 +12,4 @@
12
12
  @import "./mixins/list";
13
13
  @import "./mixins/pill";
14
14
  @import "./mixins/table";
15
- @import "./mixins/wrap";
15
+ @import "./mixins/wrap";
@@ -14,4 +14,4 @@
14
14
  @import "./modules/tag";
15
15
  @import "./modules/tile";
16
16
  @import "./modules/table";
17
- @import "./modules/tooltip";
17
+ @import "./modules/tooltip";
package/scss/_root.scss CHANGED
@@ -27,4 +27,4 @@
27
27
 
28
28
  --body-color: #{$body-color};
29
29
  --body-background: #{$body-background};
30
- }
30
+ }
@@ -14,4 +14,4 @@
14
14
  @import "./utilities/translate";
15
15
  @import "./utilities/typography";
16
16
  @import "./utilities/visibility";
17
- @import "./utilities/zIndex";
17
+ @import "./utilities/zIndex";