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:
28
scss/mixins/_hover.scss
Normal file
28
scss/mixins/_hover.scss
Normal 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 }
|
||||
}
|
Reference in New Issue
Block a user