@eui/styles 21.0.0-rc.2 → 21.0.0-rc.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.
|
@@ -57,6 +57,15 @@
|
|
|
57
57
|
// method 1 check here : very accurate contrast compared to chrome extension contrast checker tool
|
|
58
58
|
// https://gist.github.com/isGabe/8959422
|
|
59
59
|
|
|
60
|
+
@function get-rgb-transformer($rgb) {
|
|
61
|
+
@if ($rgb < .03928) {
|
|
62
|
+
@return calc($rgb / 12.92);
|
|
63
|
+
} @else {
|
|
64
|
+
@return math.pow(math.div($rgb + .055, 1.055), 2.4);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
60
69
|
@function color_luminance($color) {
|
|
61
70
|
// Adapted from: https://github.com/LeaVerou/contrast-ratio/blob/gh-pages/color.js
|
|
62
71
|
// Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
@@ -64,16 +73,16 @@
|
|
|
64
73
|
$rgba2: (
|
|
65
74
|
);
|
|
66
75
|
|
|
67
|
-
@for $i from 1 through 3 {
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
@for $i from 1 through 3 {
|
|
77
|
+
$rgb: nth($rgba, $i);
|
|
78
|
+
$rgb: calc($rgb / 255);
|
|
70
79
|
|
|
71
|
-
|
|
80
|
+
$rgb: get-rgb-transformer($rgb);
|
|
72
81
|
|
|
73
|
-
|
|
74
|
-
}
|
|
82
|
+
$rgba2: append($rgba2, $rgb);
|
|
83
|
+
}
|
|
75
84
|
|
|
76
|
-
@return .2126 * nth($rgba2, 1)+.7152 * nth($rgba2, 2)+0.0722 * nth($rgba2, 3);
|
|
85
|
+
@return .2126 * nth($rgba2, 1)+.7152 * nth($rgba2, 2)+0.0722 * nth($rgba2, 3);
|
|
77
86
|
}
|
|
78
87
|
|
|
79
88
|
@function calculate-contrast($color1, $color2) {
|
|
@@ -102,6 +111,10 @@
|
|
|
102
111
|
}
|
|
103
112
|
|
|
104
113
|
@function shift-color($color, $weight) {
|
|
105
|
-
|
|
114
|
+
@if $weight > 0 {
|
|
115
|
+
@return shade-color($color, $weight);
|
|
116
|
+
} @else {
|
|
117
|
+
@return tint-color($color, -$weight);
|
|
118
|
+
}
|
|
106
119
|
}
|
|
107
120
|
|
|
@@ -295,10 +295,10 @@ $color-map-extra: (
|
|
|
295
295
|
|
|
296
296
|
'ecl-orange': (
|
|
297
297
|
50: #fff3e9,
|
|
298
|
-
100: #
|
|
299
|
-
200: #
|
|
300
|
-
300: #
|
|
301
|
-
400: #
|
|
298
|
+
100: #ffe9d6,
|
|
299
|
+
200: #ffdbba,
|
|
300
|
+
300: #ffc998,
|
|
301
|
+
400: #ffb16a,
|
|
302
302
|
500: #ff8a20,
|
|
303
303
|
600: #e87e1d,
|
|
304
304
|
700: #b56217,
|
|
@@ -309,10 +309,10 @@ $color-map-extra: (
|
|
|
309
309
|
|
|
310
310
|
'ecl-purple': (
|
|
311
311
|
50: #f4effb,
|
|
312
|
-
100: #
|
|
313
|
-
200: #
|
|
314
|
-
300: #
|
|
315
|
-
400: #
|
|
312
|
+
100: #ebe1f8,
|
|
313
|
+
200: #ddcdf3,
|
|
314
|
+
300: #ccb5ee,
|
|
315
|
+
400: #b594e6,
|
|
316
316
|
500: #905fd9,
|
|
317
317
|
600: #8356c5,
|
|
318
318
|
700: #66439a,
|