Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @mixin focus-with-keyboard {
- html[data-whatinput="keyboard"] &:focus {
- @content;
- }
- }
- @mixin focus-without-keyboard {
- html[data-whatinput="initial"] &:focus,
- html[data-whatinput="mouse"] &:focus,
- html[data-whatinput="touch"] &:focus {
- @content;
- }
- }
- @mixin focus-clear {
- outline: none;
- }
- @mixin focus-clear-without-keyboard {
- @include focus-without-keyboard {
- @include focus-clear;
- }
- }
- a {
- @include focus-clear-without-keyboard;
- }
- .btn {
- @include focus-clear;
- @include focus-with-keyboard {
- background-color: lightgray;
- }
- }
Add Comment
Please, Sign In to add comment