Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling of :hover on mobile by prefixing :hover selectors with .no-touch #13049

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ module.exports = function (grunt) {
bootstrap: {
src: [
'js/transition.js',
'js/touch-detection.js',
'js/alert.js',
'js/button.js',
'js/carousel.js',
Expand Down Expand Up @@ -216,6 +217,27 @@ module.exports = function (grunt) {
}
},

notouch: {
options: {
selectorPrefix: '.bs-no-touch'
},
core: {
src: '<%= autoprefixer.core.src %>'
},
theme: {
src: '<%= autoprefixer.theme.src %>'
},
docs: {
src: '<%= autoprefixer.docs.src %>'
},
examples: {
expand: true,
cwd: 'docs/examples/',
src: '<%= autoprefixer.examples.src %>',
dest: '<%= autoprefixer.examples.dest %>'
}
},

cssflip: {
rtl: {
files: {
Expand Down Expand Up @@ -408,6 +430,7 @@ module.exports = function (grunt) {

// These plugins provide necessary tasks.
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
grunt.loadTasks('./grunt/tasks/');
require('time-grunt')(grunt);

// Docs HTML validation task
Expand Down Expand Up @@ -437,7 +460,7 @@ module.exports = function (grunt) {

// CSS distribution task.
grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']);
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer', 'cssflip', 'usebanner', 'csscomb', 'less:minify', 'cssmin']);
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer', 'notouch', 'cssflip', 'usebanner', 'csscomb', 'less:minify', 'cssmin']);

// Docs distribution task.
grunt.registerTask('dist-docs', 'copy:docs');
Expand Down
Loading