diff options
author | Thomas Park <thomas@thomaspark.co> | 2015-05-15 13:38:57 -0400 |
---|---|---|
committer | Thomas Park <thomas@thomaspark.co> | 2015-05-15 13:38:57 -0400 |
commit | 407e1e667fed1ab54f354dcc173718ca46a9f35f (patch) | |
tree | bf0ef985ce4c1f49af9175a0e428fda122c53f16 /Gruntfile.js | |
parent | 59064bd787e83a436c79955a13f9d8ac59e19142 (diff) | |
parent | faf169d9ff9e6cad3a1127d3fe3807639e4a2cb9 (diff) |
Merge pull request #456 from jaywilliams/sass-default-flag
Set Sass !default flag
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index c21bfeb6..d8dbc5a6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -230,6 +230,10 @@ grunt.registerTask('build_scss', 'build a regular theme from scss', function(the // 10. replace bower and imports in build.scss .replace(/bootstrap\/less\//g, 'bootstrap-sass-official/assets/stylesheets/') .replace(/\.less/g, ''); + // 11. only assign variables if they haven't been previously set e.g. $var: #f00; > $var: #f00 !default; + if (/\/variables.less$/.test(lessFile)) { + out = out.replace(/^(\$.*);/gm, '$1 !default;'); + } var baseDirRegex = new RegExp("^" + convertBaseDir, "g"); var sassFile = lessFile.replace(baseDirRegex, '').replace(/\.less$/, '.scss').replace(/(bootswatch|variables)/, '_$1'); |