mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-06 04:08:22 +01:00
account for mq4-hover-shim's renaming & org move
This commit is contained in:
parent
7294506ebb
commit
f265fed3eb
@ -19,7 +19,7 @@ module.exports = function (grunt) {
|
|||||||
var path = require('path');
|
var path = require('path');
|
||||||
var glob = require('glob');
|
var glob = require('glob');
|
||||||
var npmShrinkwrap = require('npm-shrinkwrap');
|
var npmShrinkwrap = require('npm-shrinkwrap');
|
||||||
var mq4HoverShim = require('mq4-hover-hover-shim');
|
var mq4HoverShim = require('mq4-hover-shim');
|
||||||
|
|
||||||
var generateCommonJSModule = require('./grunt/bs-commonjs-generator.js');
|
var generateCommonJSModule = require('./grunt/bs-commonjs-generator.js');
|
||||||
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' });
|
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' });
|
||||||
|
@ -169,7 +169,7 @@ Page zooming inevitably presents rendering artifacts in some components, both in
|
|||||||
### Sticky `:hover`/`:focus` on mobile
|
### Sticky `:hover`/`:focus` on mobile
|
||||||
Even though real hovering isn't possible on most touchscreens, most mobile browsers emulate hovering support and make `:hover` "sticky". In other words, `:hover` styles start applying after tapping an element and only stop applying after the user taps some other element. On mobile-first sites, this behavior is normally undesirable.
|
Even though real hovering isn't possible on most touchscreens, most mobile browsers emulate hovering support and make `:hover` "sticky". In other words, `:hover` styles start applying after tapping an element and only stop applying after the user taps some other element. On mobile-first sites, this behavior is normally undesirable.
|
||||||
|
|
||||||
Bootstrap includes a workaround for this, although it is disabled by default. By setting `$use-hover-media-query` to `true` when compiling from Sass, Bootstrap will use [mq4-hover-hover-shim](https://github.com/cvrebert/mq4-hover-hover-shim) to disable `:hover` styles in browsers that emulate hovering, thus preventing sticky `:hover` styles. There are some caveats to this workaround; see the shim's documentation for details.
|
Bootstrap includes a workaround for this, although it is disabled by default. By setting `$use-hover-media-query` to `true` when compiling from Sass, Bootstrap will use [mq4-hover-shim](https://github.com/twbs/mq4-hover-shim) to disable `:hover` styles in browsers that emulate hovering, thus preventing sticky `:hover` styles. There are some caveats to this workaround; see the shim's documentation for details.
|
||||||
|
|
||||||
### Printing
|
### Printing
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
"grunt-sed": "~0.1.1",
|
"grunt-sed": "~0.1.1",
|
||||||
"load-grunt-tasks": "~2.0.0",
|
"load-grunt-tasks": "~2.0.0",
|
||||||
"markdown-it": "^3.0.4",
|
"markdown-it": "^3.0.4",
|
||||||
"mq4-hover-hover-shim": "0.0.4",
|
"mq4-hover-shim": "^0.1.0",
|
||||||
"npm-shrinkwrap": "^200.0.0",
|
"npm-shrinkwrap": "^200.0.0",
|
||||||
"time-grunt": "~1.0.0"
|
"time-grunt": "~1.0.0"
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@mixin hover {
|
@mixin hover {
|
||||||
@if $use-hover-media-query {
|
@if $use-hover-media-query {
|
||||||
// See Media Queries Level 4: http://drafts.csswg.org/mediaqueries/#hover
|
// See Media Queries Level 4: http://drafts.csswg.org/mediaqueries/#hover
|
||||||
// Currently shimmed by https://github.com/cvrebert/mq4-hover-hover-shim
|
// Currently shimmed by https://github.com/twbs/mq4-hover-shim
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
&:hover { @content }
|
&:hover { @content }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user