@madj2k/fe-frontend-kit 2.0.10 → 2.0.12
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/package.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
///
|
|
13
13
|
/// @param {Color} $color - Outline color for focused state. Defaults to `$color-outline`.
|
|
14
14
|
/// @param {Length} $width - Outline width. Defaults to `3px`.
|
|
15
|
+
/// @param {Selector} $selector - Optional sub-selector to apply the outline to. Defaults to `null`
|
|
15
16
|
///
|
|
16
17
|
/// @example scss
|
|
17
18
|
/// button,
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
/// @author Steffen Kroggel <developer@steffenkroggel>
|
|
28
29
|
/// @license GNU General Public License v3.0 https://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
30
|
///
|
|
30
|
-
@mixin accessibility-outline
|
|
31
|
+
@mixin accessibility-outline($color: var(--bs-primary), $width: 3px, $selector: null) {
|
|
31
32
|
|
|
32
33
|
&:focus,
|
|
33
34
|
&:focus-within {
|
|
@@ -36,7 +37,17 @@
|
|
|
36
37
|
|
|
37
38
|
&:has(input:focus-visible),
|
|
38
39
|
&:focus-visible {
|
|
39
|
-
|
|
40
|
+
@if $selector == null {
|
|
41
|
+
outline: rem-calc($width) solid $color;
|
|
42
|
+
} @else if str-slice($selector, 1, 2) == '::' {
|
|
43
|
+
#{&}#{$selector} {
|
|
44
|
+
outline: rem-calc($width) solid $color;
|
|
45
|
+
}
|
|
46
|
+
} @else {
|
|
47
|
+
& #{$selector} {
|
|
48
|
+
outline: rem-calc($width) solid $color;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
40
51
|
}
|
|
41
|
-
|
|
42
52
|
}
|
|
53
|
+
|