Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 51c39ee

Browse files
author
george
committed
simplify using-keyboard selector string to loop through -field-types
1 parent 13efdc5 commit 51c39ee

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/scss/utilities/_mixins.scss

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,13 @@ $arrow-border-position: $arrow-size * -2;
251251
}
252252

253253
@mixin using-keyboard {
254-
// stylelint-disable
255-
.using-keyboard
256-
*:not([type="text"]):not([type="email"]):not([type="password"]):not([type="search"]):not([type="url"]):not(textarea):not(select):focus {
254+
$inputs: "";
255+
256+
@each $type in $input-field-types {
257+
$inputs: $inputs + ':not([type="#{$type}"])';
258+
}
259+
260+
.using-keyboard *#{$inputs}:not(textarea):not(select):focus {
257261
outline: $global-outline-using-keyboard !important;
258262
}
259-
// stylelint-enable
260263
}

0 commit comments

Comments
 (0)