grafana/public/sass/mixins/_hover.scss

68 lines
985 B
SCSS
Raw Normal View History

2016-02-16 03:42:06 -06:00
@mixin hover {
@if $enable-hover-media-query {
// See Media Queries Level 4: http://drafts.csswg.org/mediaqueries/#hover
// Currently shimmed by https://github.com/twbs/mq4-hover-shim
@media (hover: hover) {
2017-12-19 09:22:41 -06:00
&:hover {
@content;
}
}
} @else {
&:hover {
@content;
2016-02-16 03:42:06 -06:00
}
}
}
@mixin hover-focus {
@if $enable-hover-media-query {
2017-12-19 09:22:41 -06:00
&:focus {
@content;
}
@include hover {
@content;
}
} @else {
2016-02-16 03:42:06 -06:00
&:focus,
&:hover {
2017-12-19 09:22:41 -06:00
@content;
2016-02-16 03:42:06 -06:00
}
}
}
@mixin plain-hover-focus {
@if $enable-hover-media-query {
&,
&:focus {
2017-12-19 09:22:41 -06:00
@content;
2016-02-16 03:42:06 -06:00
}
2017-12-19 09:22:41 -06:00
@include hover {
@content;
}
} @else {
2016-02-16 03:42:06 -06:00
&,
&:focus,
&:hover {
2017-12-19 09:22:41 -06:00
@content;
2016-02-16 03:42:06 -06:00
}
}
}
@mixin hover-focus-active {
@if $enable-hover-media-query {
&:focus,
&:active {
2017-12-19 09:22:41 -06:00
@content;
2016-02-16 03:42:06 -06:00
}
2017-12-19 09:22:41 -06:00
@include hover {
@content;
}
} @else {
2016-02-16 03:42:06 -06:00
&:focus,
&:active,
&:hover {
2017-12-19 09:22:41 -06:00
@content;
2016-02-16 03:42:06 -06:00
}
}
}