Created
August 27, 2013 07:32
-
-
Save jpdevries/6350682 to your computer and use it in GitHub Desktop.
Reproducing potential Sass bug with extending silent classes from within silent classes using grunt-sass. To test, Download files, cd to directory and:
npm install
grunt Logged bug for grunt-sass here
https://github.com/sindresorhus/grunt-sass/issues/40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { // Task | |
dist: { // Target | |
files: { // Dictionary of files | |
'style.css': 'style.scss' // 'destination': 'source' | |
} | |
}, | |
dev: { // Another target | |
options: { // Dictionary of render options | |
}, | |
files: { | |
'style.css': 'style.scss' | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-sass'); /* this doesn't work, creates a bad selector (%focusable:active, %focusable:focus, #mydiv) */ | |
/* grunt.loadNpmTasks('grunt-contrib-sass'); */ /* this works */ | |
// Tasks | |
grunt.registerTask('default', ['sass:dev']); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "extendextend", | |
"version": "0.0.1", | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-sass": "~0.6.1", | |
"grunt-contrib-sass": "~0.5.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%focusable:active, %focusable:focus, #mydiv { /* bad selector generated by grunt-sass (grunt-contrib-sass works correclty) */ | |
border: 0; | |
clip: rect(0 0 0 0); | |
height: 1px; | |
margin: -1px; | |
overflow: hidden; | |
padding: 0; | |
position: absolute; | |
width: 1px; } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%visuallyhidden { | |
border: 0; | |
clip: rect(0 0 0 0); | |
height: 1px; | |
margin: -1px; | |
overflow: hidden; | |
padding: 0; | |
position: absolute; | |
width: 1px; | |
} | |
%focusable:active, | |
%focusable:focus { | |
clip: auto; | |
height: auto; | |
margin: 0; | |
overflow: visible; | |
position: static; | |
width: auto; | |
@extend %visuallyhidden; | |
} | |
#mydiv { | |
@extend %visuallyhidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment