@coreui/coreui 5.4.2 → 5.5.0
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/README.md +4 -2
- package/dist/css/coreui-grid.css +1 -1
- package/dist/css/coreui-grid.css.map +1 -1
- package/dist/css/coreui-grid.min.css +1 -1
- package/dist/css/coreui-grid.min.css.map +1 -1
- package/dist/css/coreui-grid.rtl.css +1 -1
- package/dist/css/coreui-grid.rtl.css.map +1 -1
- package/dist/css/coreui-grid.rtl.min.css +1 -1
- package/dist/css/coreui-grid.rtl.min.css.map +1 -1
- package/dist/css/coreui-reboot.css +5 -1
- package/dist/css/coreui-reboot.css.map +1 -1
- package/dist/css/coreui-reboot.min.css +2 -2
- package/dist/css/coreui-reboot.min.css.map +1 -1
- package/dist/css/coreui-reboot.rtl.css +5 -1
- package/dist/css/coreui-reboot.rtl.css.map +1 -1
- package/dist/css/coreui-reboot.rtl.min.css +2 -2
- package/dist/css/coreui-reboot.rtl.min.css.map +1 -1
- package/dist/css/coreui-utilities.css +1 -1
- package/dist/css/coreui-utilities.css.map +1 -1
- package/dist/css/coreui-utilities.min.css +1 -1
- package/dist/css/coreui-utilities.min.css.map +1 -1
- package/dist/css/coreui-utilities.rtl.css +1 -1
- package/dist/css/coreui-utilities.rtl.css.map +1 -1
- package/dist/css/coreui-utilities.rtl.min.css +1 -1
- package/dist/css/coreui-utilities.rtl.min.css.map +1 -1
- package/dist/css/coreui.css +6 -1
- package/dist/css/coreui.css.map +1 -1
- package/dist/css/coreui.min.css +2 -2
- package/dist/css/coreui.min.css.map +1 -1
- package/dist/css/coreui.rtl.css +6 -1
- package/dist/css/coreui.rtl.css.map +1 -1
- package/dist/css/coreui.rtl.min.css +2 -2
- package/dist/css/coreui.rtl.min.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.css +24 -19
- package/dist/css/themes/bootstrap/bootstrap.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.min.css +2 -2
- package/dist/css/themes/bootstrap/bootstrap.min.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.rtl.css +23 -18
- package/dist/css/themes/bootstrap/bootstrap.rtl.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.rtl.min.css +2 -2
- package/dist/css/themes/bootstrap/bootstrap.rtl.min.css.map +1 -1
- package/dist/js/bootstrap.bundle.js +2 -2
- package/dist/js/bootstrap.bundle.js.map +1 -1
- package/dist/js/bootstrap.bundle.min.js +2 -2
- package/dist/js/bootstrap.bundle.min.js.map +1 -1
- package/dist/js/bootstrap.esm.js +2 -2
- package/dist/js/bootstrap.esm.js.map +1 -1
- package/dist/js/bootstrap.esm.min.js +2 -2
- package/dist/js/bootstrap.esm.min.js.map +1 -1
- package/dist/js/bootstrap.js +2 -2
- package/dist/js/bootstrap.js.map +1 -1
- package/dist/js/bootstrap.min.js +2 -2
- package/dist/js/bootstrap.min.js.map +1 -1
- package/dist/js/coreui.bundle.js +2 -2
- package/dist/js/coreui.bundle.js.map +1 -1
- package/dist/js/coreui.bundle.min.js +2 -2
- package/dist/js/coreui.bundle.min.js.map +1 -1
- package/dist/js/coreui.esm.js +2 -2
- package/dist/js/coreui.esm.js.map +1 -1
- package/dist/js/coreui.esm.min.js +2 -2
- package/dist/js/coreui.esm.min.js.map +1 -1
- package/dist/js/coreui.js +2 -2
- package/dist/js/coreui.js.map +1 -1
- package/dist/js/coreui.min.js +2 -2
- package/dist/js/coreui.min.js.map +1 -1
- package/js/dist/alert.js +1 -1
- package/js/dist/base-component.js +2 -2
- package/js/dist/base-component.js.map +1 -1
- package/js/dist/button.js +1 -1
- package/js/dist/carousel.js +1 -1
- package/js/dist/collapse.js +1 -1
- package/js/dist/dom/data.js +1 -1
- package/js/dist/dom/event-handler.js +1 -1
- package/js/dist/dom/manipulator.js +1 -1
- package/js/dist/dom/selector-engine.js +1 -1
- package/js/dist/dropdown.js +1 -1
- package/js/dist/modal.js +1 -1
- package/js/dist/navigation.js +1 -1
- package/js/dist/offcanvas.js +1 -1
- package/js/dist/popover.js +1 -1
- package/js/dist/scrollspy.js +1 -1
- package/js/dist/sidebar.js +1 -1
- package/js/dist/tab.js +1 -1
- package/js/dist/toast.js +1 -1
- package/js/dist/tooltip.js +1 -1
- package/js/dist/util/backdrop.js +1 -1
- package/js/dist/util/component-functions.js +1 -1
- package/js/dist/util/config.js +1 -1
- package/js/dist/util/focustrap.js +1 -1
- package/js/dist/util/index.js +1 -1
- package/js/dist/util/sanitizer.js +1 -1
- package/js/dist/util/scrollbar.js +1 -1
- package/js/dist/util/swipe.js +1 -1
- package/js/dist/util/template-factory.js +1 -1
- package/js/src/base-component.js +1 -1
- package/package.json +31 -30
- package/scss/_banner.scss +1 -1
- package/scss/_buttons.scss +9 -5
- package/scss/_card.scss +2 -1
- package/scss/_carousel.scss +4 -2
- package/scss/_dropdown.scss +5 -3
- package/scss/_header.scss +3 -2
- package/scss/_list-group.scss +1 -1
- package/scss/_maps.scss +2 -1
- package/scss/_modal.scss +2 -1
- package/scss/_nav.scss +3 -2
- package/scss/_navbar.scss +5 -3
- package/scss/_pagination.scss +3 -2
- package/scss/_reboot.scss +6 -0
- package/scss/_spinners.scss +1 -0
- package/scss/forms/_form-control.scss +2 -1
- package/scss/functions/_color-contrast-variables.scss +1 -1
- package/scss/functions/_color-contrast.scss +1 -1
- package/scss/functions/_color.scss +5 -1
- package/scss/functions/_contrast-ratio.scss +11 -6
- package/scss/functions/_maps.scss +9 -1
- package/scss/functions/_math.scss +4 -3
- package/scss/helpers/_color-bg.scss +8 -4
- package/scss/helpers/_colored-links.scss +18 -9
- package/scss/mixins/_breakpoints.scss +9 -4
- package/scss/mixins/_buttons.scss +4 -4
- package/scss/mixins/_forms.scss +3 -3
- package/scss/mixins/_grid.scss +4 -2
- package/scss/mixins/_ltr-rtl.scss +24 -12
- package/scss/mixins/_table-variants.scss +6 -4
- package/scss/mixins/_utilities.scss +22 -12
- package/scss/vendor/_rfs.scss +27 -19
package/scss/_spinners.scss
CHANGED
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
// https://github.com/twbs/bootstrap/issues/23307
|
|
65
65
|
// TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
|
|
66
66
|
// Multiply line-height by 1em if it has no unit
|
|
67
|
-
|
|
67
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
68
|
+
height: if(sass(math.unit($input-line-height) == ""): $input-line-height * 1em; else: $input-line-height);
|
|
68
69
|
|
|
69
70
|
// Android Chrome type="date" is taller than the other inputs
|
|
70
71
|
// because of "margin: 1px 24px 1px 4px" inside the shadow DOM
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
@each $color in $foregrounds {
|
|
11
11
|
$contrast-ratio: contrast-ratio($background, $color);
|
|
12
|
-
@if $contrast-ratio
|
|
12
|
+
@if $contrast-ratio >= $min-contrast-ratio {
|
|
13
13
|
@return $color;
|
|
14
14
|
} @else if $contrast-ratio > $max-ratio {
|
|
15
15
|
$max-ratio: $contrast-ratio;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
@each $color in $foregrounds {
|
|
14
14
|
$contrast-ratio: contrast-ratio($background, $color);
|
|
15
|
-
@if $contrast-ratio
|
|
15
|
+
@if $contrast-ratio >= $min-contrast-ratio {
|
|
16
16
|
@return $color;
|
|
17
17
|
} @else if $contrast-ratio > $max-ratio {
|
|
18
18
|
$max-ratio: $contrast-ratio;
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
|
|
14
14
|
// Shade the color if the weight is positive, else tint it
|
|
15
15
|
@function shift-color($color, $weight) {
|
|
16
|
-
@
|
|
16
|
+
@if $weight > 0 {
|
|
17
|
+
@return shade-color($color, $weight);
|
|
18
|
+
} @else {
|
|
19
|
+
@return tint-color($color, -$weight);
|
|
20
|
+
}
|
|
17
21
|
}
|
|
18
22
|
// scss-docs-end color-functions
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
@use "sass:color";
|
|
2
|
+
@use "sass:list";
|
|
2
3
|
@use "sass:map";
|
|
3
4
|
@use "sass:math";
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
// A list of pre-calculated numbers of pow(divide((divide($value, 255) + .055), 1.055), 2.4). (from 0 to 255)
|
|
7
|
+
// stylelint-disable-next-line scss/dollar-variable-default, scss/dollar-variable-pattern
|
|
8
|
+
$_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;
|
|
5
9
|
|
|
6
10
|
@function contrast-ratio($background, $foreground) {
|
|
7
11
|
$l1: luminance($background);
|
|
8
12
|
$l2: luminance(opaque($background, $foreground));
|
|
9
13
|
|
|
10
|
-
@return if($l1 > $l2
|
|
14
|
+
@return if(sass($l1 > $l2): math.div($l1 + .05, $l2 + .05); else: math.div($l2 + .05, $l1 + .05));
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
// Return WCAG2.2 relative luminance
|
|
@@ -15,13 +19,14 @@
|
|
|
15
19
|
// See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
|
|
16
20
|
@function luminance($color) {
|
|
17
21
|
$rgb: (
|
|
18
|
-
"r": color.channel($color, "red"
|
|
19
|
-
"g": color.channel($color, "green"
|
|
20
|
-
"b": color.channel($color, "blue"
|
|
22
|
+
"r": color.channel($color, "red"),
|
|
23
|
+
"g": color.channel($color, "green"),
|
|
24
|
+
"b": color.channel($color, "blue")
|
|
21
25
|
);
|
|
22
26
|
|
|
23
27
|
@each $name, $value in $rgb {
|
|
24
|
-
|
|
28
|
+
// stylelint-disable-next-line scss/at-function-named-arguments, @stylistic/function-whitespace-after
|
|
29
|
+
$value: if(sass(math.div($value, 255) < .04045): math.div(math.div($value, 255), 12.92); else: list.nth($_luminance-list, math.round($value + 1)));
|
|
25
30
|
$rgb: map.merge($rgb, ($name: $value));
|
|
26
31
|
}
|
|
27
32
|
|
|
@@ -14,7 +14,15 @@
|
|
|
14
14
|
// allow to pass the $key and $value of the map as an function argument
|
|
15
15
|
$_args: ();
|
|
16
16
|
@each $arg in $args {
|
|
17
|
-
|
|
17
|
+
@if $arg == "$prefix" {
|
|
18
|
+
$_args: list.append($_args, $prefix);
|
|
19
|
+
} @else if $arg == "$key" {
|
|
20
|
+
$_args: list.append($_args, $key);
|
|
21
|
+
} @else if $arg == "$value" {
|
|
22
|
+
$_args: list.append($_args, $value);
|
|
23
|
+
} @else {
|
|
24
|
+
$_args: list.append($_args, $arg);
|
|
25
|
+
}
|
|
18
26
|
}
|
|
19
27
|
|
|
20
28
|
$_map: map.merge($_map, ($key: meta.call(meta.get-function($func), $_args...)));
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@return $value1 + $value2;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
@return if($return-calc == true
|
|
20
|
+
@return if(sass($return-calc == true): calc(#{$value1} + #{$value2}); else: $value1 + string.unquote(" + ") + $value2);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
@function subtract($value1, $value2, $return-calc: true) {
|
|
@@ -41,11 +41,12 @@
|
|
|
41
41
|
$value2: string.unquote("(") + $value2 + string.unquote(")");
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
@return if($return-calc == true
|
|
44
|
+
@return if(sass($return-calc == true): calc(#{$value1} - #{$value2}); else: $value1 + string.unquote(" - ") + $value2);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
@function divide($dividend, $divisor, $precision: 10) {
|
|
48
|
-
|
|
48
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
49
|
+
$sign: if(sass($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0): 1; else: -1);
|
|
49
50
|
$dividend: abs($dividend);
|
|
50
51
|
$divisor: abs($divisor);
|
|
51
52
|
@if $dividend == 0 {
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
@each $color, $value in $theme-colors {
|
|
9
9
|
.text-bg-#{$color} {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
11
|
+
color: color-contrast($value) if(sass($enable-important-utilities): !important);
|
|
12
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
13
|
+
background-color: rgba(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if(sass($enable-important-utilities): !important);
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -17,8 +19,10 @@
|
|
|
17
19
|
@each $color, $value in $theme-colors-dark {
|
|
18
20
|
$color-rgb: to-rgb($value);
|
|
19
21
|
.text-bg-#{$color} {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
23
|
+
color: color-contrast($value) if(sass($enable-important-utilities): !important);
|
|
24
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
25
|
+
background-color: rgba($color-rgb, var(--#{$prefix}bg-opacity, 1)) if(sass($enable-important-utilities): !important);
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
}
|
|
@@ -5,15 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
@each $color, $value in $theme-colors {
|
|
7
7
|
.link-#{$color} {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
9
|
+
color: rgba(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-opacity, 1)) if(sass($enable-important-utilities): !important);
|
|
10
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
11
|
+
text-decoration-color: rgba(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-underline-opacity, 1)) if(sass($enable-important-utilities): !important);
|
|
10
12
|
|
|
11
13
|
@if $link-shade-percentage != 0 {
|
|
12
14
|
&:hover,
|
|
13
15
|
&:focus {
|
|
14
|
-
|
|
15
|
-
color:
|
|
16
|
-
|
|
16
|
+
// stylelint-disable-next-line scss/at-function-named-arguments, @stylistic/function-whitespace-after
|
|
17
|
+
$hover-color: if(sass(color-contrast($value) == $color-contrast-light): shade-color($value, $link-shade-percentage); else: tint-color($value, $link-shade-percentage));
|
|
18
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
19
|
+
color: rgba(#{to-rgb($hover-color)}, var(--#{$prefix}link-opacity, 1)) if(sass($enable-important-utilities): !important);
|
|
20
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
21
|
+
text-decoration-color: rgba(to-rgb($hover-color), var(--#{$prefix}link-underline-opacity, 1)) if(sass($enable-important-utilities): !important);
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
24
|
}
|
|
@@ -21,14 +26,18 @@
|
|
|
21
26
|
|
|
22
27
|
// One-off special link helper as a bridge until v6
|
|
23
28
|
.link-body-emphasis {
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
30
|
+
color: rgba(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, 1)) if(sass($enable-important-utilities): !important);
|
|
31
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
32
|
+
text-decoration-color: rgba(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, 1)) if(sass($enable-important-utilities): !important);
|
|
26
33
|
|
|
27
34
|
@if $link-shade-percentage != 0 {
|
|
28
35
|
&:hover,
|
|
29
36
|
&:focus {
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
38
|
+
color: rgba(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, .75)) if(sass($enable-important-utilities): !important);
|
|
39
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
40
|
+
text-decoration-color: rgba(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, .75)) if(sass($enable-important-utilities): !important);
|
|
32
41
|
}
|
|
33
42
|
}
|
|
34
43
|
}
|
|
@@ -23,7 +23,12 @@
|
|
|
23
23
|
@if not $n {
|
|
24
24
|
@error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
|
|
25
25
|
}
|
|
26
|
-
@
|
|
26
|
+
// Use @if/@else because list.nth would error if evaluated when $n equals list length
|
|
27
|
+
@if $n < list.length($breakpoint-names) {
|
|
28
|
+
@return list.nth($breakpoint-names, $n + 1);
|
|
29
|
+
} @else {
|
|
30
|
+
@return null;
|
|
31
|
+
}
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
|
@@ -32,7 +37,7 @@
|
|
|
32
37
|
// 576px
|
|
33
38
|
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
|
|
34
39
|
$min: map.get($breakpoints, $name);
|
|
35
|
-
@return if($min != 0
|
|
40
|
+
@return if(sass($min != 0): $min; else: null);
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
// Maximum breakpoint width.
|
|
@@ -46,7 +51,7 @@
|
|
|
46
51
|
// 767.98px
|
|
47
52
|
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
|
48
53
|
$max: map.get($breakpoints, $name);
|
|
49
|
-
@return if($max and $max > 0
|
|
54
|
+
@return if(sass($max and $max > 0): $max - .02; else: null);
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
|
@@ -57,7 +62,7 @@
|
|
|
57
62
|
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
|
58
63
|
// "-sm"
|
|
59
64
|
@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
|
|
60
|
-
@return if(breakpoint-min($name, $breakpoints) == null
|
|
65
|
+
@return if(sass(breakpoint-min($name, $breakpoints) == null): ""; else: "-#{$name}");
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
$background,
|
|
16
16
|
$border,
|
|
17
17
|
$color: color-contrast($background),
|
|
18
|
-
$hover-background: if($color == $color-contrast-light
|
|
19
|
-
$hover-border: if($color == $color-contrast-light
|
|
18
|
+
$hover-background: if(sass($color == $color-contrast-light): shade-color($background, $btn-hover-bg-shade-amount); else: tint-color($background, $btn-hover-bg-tint-amount)),
|
|
19
|
+
$hover-border: if(sass($color == $color-contrast-light): shade-color($border, $btn-hover-border-shade-amount); else: tint-color($border, $btn-hover-border-tint-amount)),
|
|
20
20
|
$hover-color: color-contrast($hover-background),
|
|
21
|
-
$active-background: if($color == $color-contrast-light
|
|
22
|
-
$active-border: if($color == $color-contrast-light
|
|
21
|
+
$active-background: if(sass($color == $color-contrast-light): shade-color($background, $btn-active-bg-shade-amount); else: tint-color($background, $btn-active-bg-tint-amount)),
|
|
22
|
+
$active-border: if(sass($color == $color-contrast-light): shade-color($border, $btn-active-border-shade-amount); else: tint-color($border, $btn-active-border-tint-amount)),
|
|
23
23
|
$active-color: color-contrast($active-background),
|
|
24
24
|
$disabled-background: $background,
|
|
25
25
|
$disabled-border: $border,
|
package/scss/mixins/_forms.scss
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
// scss-docs-start form-validation-mixins
|
|
13
13
|
@mixin form-validation-state-selector($state) {
|
|
14
14
|
@if ($state == "valid" or $state == "invalid") {
|
|
15
|
-
.was-validated #{if(
|
|
16
|
-
#{if(
|
|
15
|
+
.was-validated #{if(sass(&): "&"; else: "")}:#{$state},
|
|
16
|
+
#{if(sass(&): "&"; else: "")}.is-#{$state} {
|
|
17
17
|
@content;
|
|
18
18
|
}
|
|
19
19
|
} @else {
|
|
20
|
-
#{if(
|
|
20
|
+
#{if(sass(&): "&"; else: "")}.is-#{$state} {
|
|
21
21
|
@content;
|
|
22
22
|
}
|
|
23
23
|
}
|
package/scss/mixins/_grid.scss
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
@mixin make-col-ready($include-column-box-sizing: false) {
|
|
25
25
|
// Add box sizing if only the grid is loaded
|
|
26
|
-
|
|
26
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
27
|
+
box-sizing: if(sass(meta.variable-exists(include-column-box-sizing) and $include-column-box-sizing): border-box);
|
|
27
28
|
// Prevent columns from becoming too narrow when at smaller grid tiers by
|
|
28
29
|
// always setting `width: 100%;`. This works because we set the width
|
|
29
30
|
// later on to override this initial width.
|
|
@@ -53,7 +54,8 @@
|
|
|
53
54
|
|
|
54
55
|
@mixin make-col-offset($size, $columns: $grid-columns) {
|
|
55
56
|
$num: divide($size, $columns);
|
|
56
|
-
|
|
57
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
58
|
+
margin-inline-start: if(sass($num == 0): 0; else: math.percentage($num));
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
// Row columns
|
|
@@ -54,28 +54,34 @@
|
|
|
54
54
|
|
|
55
55
|
@if $enable-ltr and $enable-rtl {
|
|
56
56
|
@include ltr() {
|
|
57
|
-
|
|
57
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
58
|
+
#{$property}: $value if(sass($important): !important);
|
|
58
59
|
}
|
|
59
60
|
@include rtl() {
|
|
60
61
|
@if $value-rtl {
|
|
61
|
-
|
|
62
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
63
|
+
#{$property-reflected}: $value-rtl if(sass($important): !important);
|
|
62
64
|
}
|
|
63
65
|
@else {
|
|
64
|
-
|
|
66
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
67
|
+
#{$property-reflected}: $value-reflected if(sass($important): !important);
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
@else {
|
|
69
72
|
@if $enable-rtl {
|
|
70
73
|
@if $value-rtl {
|
|
71
|
-
|
|
74
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
75
|
+
#{$property-reflected}: $value-rtl if(sass($important): !important);
|
|
72
76
|
}
|
|
73
77
|
@else {
|
|
74
|
-
|
|
78
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
79
|
+
#{$property-reflected}: $value-reflected if(sass($important): !important);
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
@else {
|
|
78
|
-
|
|
83
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
84
|
+
#{$property}: $value if(sass($important): !important);
|
|
79
85
|
}
|
|
80
86
|
}
|
|
81
87
|
}
|
|
@@ -94,25 +100,31 @@
|
|
|
94
100
|
|
|
95
101
|
@if $enable-ltr and $enable-rtl {
|
|
96
102
|
@include ltr() {
|
|
97
|
-
|
|
103
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
104
|
+
#{$property}: $value if(sass($important): !important);
|
|
98
105
|
}
|
|
99
106
|
@include rtl() {
|
|
100
107
|
@if $value-rtl {
|
|
101
|
-
|
|
108
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
109
|
+
#{$property}: $value-rtl if(sass($important): !important);
|
|
102
110
|
} @else {
|
|
103
|
-
|
|
111
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
112
|
+
#{$property}: $value-reflected if(sass($important): !important);
|
|
104
113
|
}
|
|
105
114
|
}
|
|
106
115
|
}
|
|
107
116
|
@else {
|
|
108
117
|
@if $enable-rtl {
|
|
109
118
|
@if $value-rtl {
|
|
110
|
-
|
|
119
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
120
|
+
#{$property}: $value-rtl if(sass($important): !important);
|
|
111
121
|
} @else {
|
|
112
|
-
|
|
122
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
123
|
+
#{$property}: $value-reflected if(sass($important): !important);
|
|
113
124
|
}
|
|
114
125
|
} @else {
|
|
115
|
-
|
|
126
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
127
|
+
#{$property}: $value if(sass($important): !important);
|
|
116
128
|
}
|
|
117
129
|
}
|
|
118
130
|
}
|
|
@@ -12,17 +12,19 @@
|
|
|
12
12
|
$striped-bg: color.mix($color, $background, math.percentage($table-striped-bg-factor));
|
|
13
13
|
$active-bg: color.mix($color, $background, math.percentage($table-active-bg-factor));
|
|
14
14
|
$table-border-color: color.mix($color, $background, math.percentage($table-border-factor));
|
|
15
|
+
$striped-color: color-contrast($striped-bg);
|
|
16
|
+
$active-color: color-contrast($active-bg);
|
|
17
|
+
$hover-color: color-contrast($hover-bg);
|
|
15
18
|
|
|
16
19
|
--#{$prefix}table-color: #{$color};
|
|
17
20
|
--#{$prefix}table-bg: #{$background};
|
|
18
21
|
--#{$prefix}table-border-color: #{$table-border-color};
|
|
19
22
|
--#{$prefix}table-striped-bg: #{$striped-bg};
|
|
20
|
-
--#{$prefix}table-striped-color: #{
|
|
23
|
+
--#{$prefix}table-striped-color: #{$striped-color};
|
|
21
24
|
--#{$prefix}table-active-bg: #{$active-bg};
|
|
22
|
-
--#{$prefix}table-active-color: #{
|
|
25
|
+
--#{$prefix}table-active-color: #{$active-color};
|
|
23
26
|
--#{$prefix}table-hover-bg: #{$hover-bg};
|
|
24
|
-
--#{$prefix}table-hover-color: #{
|
|
25
|
-
|
|
27
|
+
--#{$prefix}table-hover-color: #{$hover-color};
|
|
26
28
|
color: var(--#{$prefix}table-color);
|
|
27
29
|
border-color: var(--#{$prefix}table-border-color);
|
|
28
30
|
}
|
|
@@ -30,19 +30,25 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
// Use custom class if present
|
|
33
|
-
|
|
34
|
-
$property-class: if($
|
|
33
|
+
// stylelint-disable-next-line scss/at-function-named-arguments, @stylistic/function-whitespace-after
|
|
34
|
+
$property-class: if(sass(map.has-key($utility, class)): map.get($utility, class); else: list.nth($properties, 1));
|
|
35
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
36
|
+
$property-class: if(sass($property-class == null): ""; else: $property-class);
|
|
35
37
|
|
|
36
38
|
// Use custom CSS variable name if present, otherwise default to `class`
|
|
37
|
-
|
|
39
|
+
// stylelint-disable-next-line scss/at-function-named-arguments, @stylistic/function-whitespace-after
|
|
40
|
+
$css-variable-name: if(sass(map.has-key($utility, css-variable-name)): map.get($utility, css-variable-name); else: map.get($utility, class));
|
|
38
41
|
|
|
39
42
|
// State params to generate pseudo-classes
|
|
40
|
-
|
|
43
|
+
// stylelint-disable-next-line scss/at-function-named-arguments, @stylistic/function-whitespace-after
|
|
44
|
+
$state: if(sass(map.has-key($utility, state)): map.get($utility, state); else: ());
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
// stylelint-disable-next-line scss/at-function-named-arguments, @stylistic/function-whitespace-after
|
|
47
|
+
$infix: if(sass($property-class == "" and string.slice($infix, 1, 1) == "-"): string.slice($infix, 2); else: $infix);
|
|
43
48
|
|
|
44
49
|
// Don't prefix if value key is null (e.g. with shadow class)
|
|
45
|
-
|
|
50
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
51
|
+
$property-class-modifier: if(sass($key): if(sass($property-class == "" and $infix == ""): ""; else: "-") + $key; else: "");
|
|
46
52
|
|
|
47
53
|
@if map.get($utility, rfs) {
|
|
48
54
|
// Inside the media query
|
|
@@ -50,7 +56,8 @@
|
|
|
50
56
|
$val: rfs-value($value);
|
|
51
57
|
|
|
52
58
|
// Do not render anything if fluid and non fluid values are the same
|
|
53
|
-
|
|
59
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
60
|
+
$value: if(sass($val == rfs-fluid-value($value)): null; else: $val);
|
|
54
61
|
}
|
|
55
62
|
@else {
|
|
56
63
|
$value: rfs-fluid-value($value);
|
|
@@ -94,7 +101,8 @@
|
|
|
94
101
|
--#{$prefix}#{$local-var}: #{$variable};
|
|
95
102
|
}
|
|
96
103
|
}
|
|
97
|
-
|
|
104
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
105
|
+
#{$property}: $value if(sass($enable-important-utilities): !important);
|
|
98
106
|
}
|
|
99
107
|
}
|
|
100
108
|
} @else {
|
|
@@ -107,12 +115,13 @@
|
|
|
107
115
|
}
|
|
108
116
|
@if $is-rtl == true {
|
|
109
117
|
@if (meta.type-of($value) == "map") {
|
|
110
|
-
@include ltr-rtl($property, map.get($value, "ltr"), null, map.get($value, "rtl"), if($enable-important-utilities
|
|
118
|
+
@include ltr-rtl($property, map.get($value, "ltr"), null, map.get($value, "rtl"), if(sass($enable-important-utilities): !important));
|
|
111
119
|
} @else {
|
|
112
|
-
@include ltr-rtl($property, $value, null, null, if($enable-important-utilities
|
|
120
|
+
@include ltr-rtl($property, $value, null, null, if(sass($enable-important-utilities): !important));
|
|
113
121
|
}
|
|
114
122
|
} @else {
|
|
115
|
-
|
|
123
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
124
|
+
#{$property}: $value if(sass($enable-important-utilities): !important);
|
|
116
125
|
}
|
|
117
126
|
}
|
|
118
127
|
}
|
|
@@ -126,7 +135,8 @@
|
|
|
126
135
|
--#{$prefix}#{$local-var}: #{$variable};
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
|
-
|
|
138
|
+
// stylelint-disable-next-line scss/at-function-named-arguments
|
|
139
|
+
#{$property}: $value if(sass($enable-important-utilities): !important);
|
|
130
140
|
}
|
|
131
141
|
}
|
|
132
142
|
}
|
package/scss/vendor/_rfs.scss
CHANGED
|
@@ -59,7 +59,7 @@ $enable-rfs: $enable-rfs !default;
|
|
|
59
59
|
$rfs-base-value-unit: math.unit($rfs-base-value);
|
|
60
60
|
|
|
61
61
|
@function rfs-divide($dividend, $divisor, $precision: 10) {
|
|
62
|
-
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0
|
|
62
|
+
$sign: if(sass($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0): 1; else: -1);
|
|
63
63
|
$dividend: abs($dividend);
|
|
64
64
|
$divisor: abs($divisor);
|
|
65
65
|
@if $dividend == 0 {
|
|
@@ -120,9 +120,9 @@ $rfs-breakpoint-unit-cache: math.unit($rfs-breakpoint);
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// Calculate the media query value
|
|
123
|
-
$rfs-mq-value: if($rfs-breakpoint-unit == px
|
|
124
|
-
$rfs-mq-property-width: if($rfs-mode == max-media-query
|
|
125
|
-
$rfs-mq-property-height: if($rfs-mode == max-media-query
|
|
123
|
+
$rfs-mq-value: if(sass($rfs-breakpoint-unit == px): #{$rfs-breakpoint}px; else: #{rfs-divide($rfs-breakpoint, $rfs-rem-value)}#{$rfs-breakpoint-unit});
|
|
124
|
+
$rfs-mq-property-width: if(sass($rfs-mode == max-media-query): max-width; else: min-width);
|
|
125
|
+
$rfs-mq-property-height: if(sass($rfs-mode == max-media-query): max-height; else: min-height);
|
|
126
126
|
|
|
127
127
|
// Internal mixin used to determine which media query needs to be used
|
|
128
128
|
@mixin _rfs-media-query {
|
|
@@ -196,7 +196,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
|
|
|
196
196
|
// Helper function to get the formatted non-responsive value
|
|
197
197
|
@function rfs-value($values) {
|
|
198
198
|
// Convert to list
|
|
199
|
-
$values: if(meta.type-of($values) != list
|
|
199
|
+
$values: if(sass(meta.type-of($values) != list): ($values,); else: $values);
|
|
200
200
|
|
|
201
201
|
$val: "";
|
|
202
202
|
|
|
@@ -207,15 +207,19 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
|
|
|
207
207
|
}
|
|
208
208
|
@else {
|
|
209
209
|
// Cache $value unit
|
|
210
|
-
$unit:
|
|
210
|
+
$unit: false;
|
|
211
|
+
|
|
212
|
+
@if meta.type-of($value) == "number" {
|
|
213
|
+
$unit: math.unit($value);
|
|
214
|
+
};
|
|
211
215
|
|
|
212
216
|
@if $unit == px {
|
|
213
217
|
// Convert to rem if needed
|
|
214
|
-
$val: $val + " " + if($rfs-unit == rem
|
|
218
|
+
$val: $val + " " + if(sass($rfs-unit == rem): #{rfs-divide($value, $value * 0 + $rfs-rem-value)}rem; else: $value);
|
|
215
219
|
}
|
|
216
220
|
@else if $unit == rem {
|
|
217
221
|
// Convert to px if needed
|
|
218
|
-
$val: $val + " " + if($rfs-unit == px
|
|
222
|
+
$val: $val + " " + if(sass($rfs-unit == px): #{rfs-divide($value, $value * 0 + 1) * $rfs-rem-value}px; else: $value);
|
|
219
223
|
} @else {
|
|
220
224
|
// If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
|
|
221
225
|
$val: $val + " " + $value;
|
|
@@ -230,7 +234,7 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
|
|
|
230
234
|
// Helper function to get the responsive value calculated by RFS
|
|
231
235
|
@function rfs-fluid-value($values) {
|
|
232
236
|
// Convert to list
|
|
233
|
-
$values: if(meta.type-of($values) != list
|
|
237
|
+
$values: if(sass(meta.type-of($values) != list): (($values,)); else: $values);
|
|
234
238
|
|
|
235
239
|
$val: "";
|
|
236
240
|
|
|
@@ -240,18 +244,22 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
|
|
|
240
244
|
$val: $val + " 0";
|
|
241
245
|
} @else {
|
|
242
246
|
// Cache $value unit
|
|
243
|
-
$unit:
|
|
247
|
+
$unit: false;
|
|
248
|
+
|
|
249
|
+
@if meta.type-of($value) == "number" {
|
|
250
|
+
$unit: math.unit($value);
|
|
251
|
+
};
|
|
244
252
|
|
|
245
253
|
// If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
|
|
246
254
|
@if not $unit or $unit != px and $unit != rem {
|
|
247
255
|
$val: $val + " " + $value;
|
|
248
256
|
} @else {
|
|
249
257
|
// Remove unit from $value for calculations
|
|
250
|
-
$value: rfs-divide($value, $value * 0 + if($unit == px
|
|
258
|
+
$value: rfs-divide($value, $value * 0 + if(sass($unit == px): 1; else: rfs-divide(1, $rfs-rem-value)));
|
|
251
259
|
|
|
252
260
|
// Only add the media query if the value is greater than the minimum value
|
|
253
261
|
@if abs($value) <= $rfs-base-value or not $enable-rfs {
|
|
254
|
-
$val: $val + " " + if($rfs-unit == rem
|
|
262
|
+
$val: $val + " " + if(sass($rfs-unit == rem): #{rfs-divide($value, $rfs-rem-value)}rem; else: #{$value}px);
|
|
255
263
|
}
|
|
256
264
|
@else {
|
|
257
265
|
// Calculate the minimum value
|
|
@@ -261,19 +269,19 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
|
|
|
261
269
|
$value-diff: abs($value) - $value-min;
|
|
262
270
|
|
|
263
271
|
// Base value formatting
|
|
264
|
-
$min-width: if($rfs-unit == rem
|
|
272
|
+
$min-width: if(sass($rfs-unit == rem): #{rfs-divide($value-min, $rfs-rem-value)}rem; else: #{$value-min}px);
|
|
265
273
|
|
|
266
274
|
// Use negative value if needed
|
|
267
|
-
$min-width: if($value < 0
|
|
275
|
+
$min-width: if(sass($value < 0): -$min-width; else: $min-width);
|
|
268
276
|
|
|
269
277
|
// Use `vmin` if two-dimensional is enabled
|
|
270
|
-
$variable-unit: if($rfs-two-dimensional
|
|
278
|
+
$variable-unit: if(sass($rfs-two-dimensional): vmin; else: vw);
|
|
271
279
|
|
|
272
280
|
// Calculate the variable width between 0 and $rfs-breakpoint
|
|
273
281
|
$variable-width: #{rfs-divide($value-diff * 100, $rfs-breakpoint)}#{$variable-unit};
|
|
274
282
|
|
|
275
283
|
// Return the calculated value
|
|
276
|
-
$val: $val + " calc(" + $min-width + if($value < 0
|
|
284
|
+
$val: $val + " calc(" + $min-width + if(sass($value < 0): " - "; else: " + ") + $variable-width + ")";
|
|
277
285
|
}
|
|
278
286
|
}
|
|
279
287
|
}
|
|
@@ -295,14 +303,14 @@ $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height
|
|
|
295
303
|
}
|
|
296
304
|
@else {
|
|
297
305
|
@include _rfs-rule () {
|
|
298
|
-
#{$property}: if($rfs-mode == max-media-query
|
|
306
|
+
#{$property}: if(sass($rfs-mode == max-media-query): $val; else: $fluid-val);
|
|
299
307
|
|
|
300
308
|
// Include safari iframe resize fix if needed
|
|
301
|
-
min-width: if($rfs-safari-iframe-resize-bug-fix
|
|
309
|
+
min-width: if(sass($rfs-safari-iframe-resize-bug-fix): (0 * 1vw); else: null);
|
|
302
310
|
}
|
|
303
311
|
|
|
304
312
|
@include _rfs-media-query-rule () {
|
|
305
|
-
#{$property}: if($rfs-mode == max-media-query
|
|
313
|
+
#{$property}: if(sass($rfs-mode == max-media-query): $fluid-val; else: $val);
|
|
306
314
|
}
|
|
307
315
|
}
|
|
308
316
|
}
|