1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 16:50:00 +02:00

put all :hover styles within @media (hover: hover)

This commit is contained in:
Chris Rebert
2015-01-01 01:05:01 -08:00
parent c0f4dcd38e
commit 8e374bd010
26 changed files with 208 additions and 187 deletions

28
scss/mixins/_hover.scss Normal file
View File

@@ -0,0 +1,28 @@
@mixin hover {
// See Media Queries Level 4: http://drafts.csswg.org/mediaqueries/#hover
// Currently shimmed by https://github.com/cvrebert/mq4-hover-hover-shim
@media (hover: hover) {
&:hover { @content }
}
}
@mixin hover-focus {
&:focus { @content }
@include hover { @content }
}
@mixin plain-hover-focus {
&,
&:focus {
@content
}
@include hover { @content }
}
@mixin hover-focus-active {
&:focus,
&:active {
@content
}
@include hover { @content }
}