summaryrefslogtreecommitdiff
path: root/Gruntfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js4
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');