This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
understrap/src/sass/bootstrap4/mixins/_hover.scss

62 lines
1.0 KiB
SCSS
Raw Normal View History

2017-10-23 09:53:15 +00:00
// stylelint-disable indentation
2017-03-02 09:46:58 +00:00
@mixin hover {
// TODO: re-enable along with mq4-hover-shim
// @if $enable-hover-media-query {
// // See Media Queries Level 4: https://drafts.csswg.org/mediaqueries/#hover
// // Currently shimmed by https://github.com/twbs/mq4-hover-shim
// @media (hover: hover) {
// &:hover { @content }
// }
// }
// @else {
2017-10-23 09:53:15 +00:00
&:hover { @content; }
2017-03-02 09:46:58 +00:00
// }
}
2017-08-11 15:29:45 +00:00
2017-03-02 09:46:58 +00:00
@mixin hover-focus {
@if $enable-hover-media-query {
2017-10-23 09:53:15 +00:00
&:focus {
@content;
}
@include hover { @content; }
2017-08-11 15:29:45 +00:00
} @else {
2017-03-02 09:46:58 +00:00
&:focus,
&:hover {
2017-10-23 09:53:15 +00:00
@content;
2017-03-02 09:46:58 +00:00
}
}
}
@mixin plain-hover-focus {
@if $enable-hover-media-query {
&,
&:focus {
2017-10-23 09:53:15 +00:00
@content;
2017-03-02 09:46:58 +00:00
}
2017-10-23 09:53:15 +00:00
@include hover { @content; }
2017-08-11 15:29:45 +00:00
} @else {
2017-03-02 09:46:58 +00:00
&,
&:focus,
&:hover {
2017-10-23 09:53:15 +00:00
@content;
2017-03-02 09:46:58 +00:00
}
}
}
@mixin hover-focus-active {
@if $enable-hover-media-query {
&:focus,
&:active {
2017-10-23 09:53:15 +00:00
@content;
2017-03-02 09:46:58 +00:00
}
2017-10-23 09:53:15 +00:00
@include hover { @content; }
2017-08-11 15:29:45 +00:00
} @else {
2017-03-02 09:46:58 +00:00
&:focus,
&:active,
&:hover {
2017-10-23 09:53:15 +00:00
@content;
2017-03-02 09:46:58 +00:00
}
}
}