diff options
| author | Max | 2017-05-18 14:03:27 +0200 |
|---|---|---|
| committer | Max | 2017-05-18 14:03:27 +0200 |
| commit | f597e2fe949a1e18eb778b9a5bd102de88570555 (patch) | |
| tree | 7e42e6f91dd3e764cd2cf0c4f61f48501c2ed98f /src/sass/bootstrap4/mixins/_hover.scss | |
| download | docs.maxmail.xyz-f597e2fe949a1e18eb778b9a5bd102de88570555.tar.gz | |
Diffstat (limited to 'src/sass/bootstrap4/mixins/_hover.scss')
| -rw-r--r-- | src/sass/bootstrap4/mixins/_hover.scss | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/sass/bootstrap4/mixins/_hover.scss b/src/sass/bootstrap4/mixins/_hover.scss new file mode 100644 index 0000000..3a11254 --- /dev/null +++ b/src/sass/bootstrap4/mixins/_hover.scss @@ -0,0 +1,59 @@ +@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) { + &:hover { @content } + } + } + @else { + &:hover { @content } + } +} + +@mixin hover-focus { + @if $enable-hover-media-query { + &:focus { @content } + @include hover { @content } + } + @else { + &:focus, + &:hover { + @content + } + } +} + +@mixin plain-hover-focus { + @if $enable-hover-media-query { + &, + &:focus { + @content + } + @include hover { @content } + } + @else { + &, + &:focus, + &:hover { + @content + } + } +} + +@mixin hover-focus-active { + @if $enable-hover-media-query { + &:focus, + &:active { + @content + } + @include hover { @content } + } + @else { + &:focus, + &:active, + &:hover { + @content + } + } +} |
