Commit ceb6bc5d authored by Thomas Park's avatar Thomas Park
Browse files

Merge pull request #516 from guru-digital/gh-pages

Fix google font import issue with scss
parents f6d93c74 f6e602e4
......@@ -199,10 +199,10 @@ grunt.registerTask('build_scss', 'build a regular theme from scss', function(the
grunt.config('buildtheme', theme);
});
/**
* Regex borrowed form
* https://gist.github.com/rosskevin/ddfe895091de2ca5f931
* */
/**
* Regex borrowed form
* https://gist.github.com/rosskevin/ddfe895091de2ca5f931
* */
grunt.registerTask('convert_less', 'Convert less to scss using regular expression', function () {
var convertBaseDir = '';
grunt.file.expand(convertBaseDir + '*/*.less').forEach(function (lessFile) {
......@@ -233,11 +233,16 @@ grunt.registerTask('build_scss', 'build a regular theme from scss', function(the
// 11. replace icon-font-path value with conditional for asset helpers
.replace(/(\$icon-font-path:).*;/g, '$1 if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/");')
// 12. set bootswatch's web-font-path value as !default
.replace(/(\$web-font-path:.*);/g, '$1 !default;');
.replace(/(\$web-font-path:.*);/g, '$1 !default;')
// 13. Remove the web-font mixin which breaks in libsass
.replace(/[\s\S][\s\S]@mixin web-font.*([\s\S]*?).*;([\s\S]*?)}([\s\S]*?)/,"")
// 14. Replace usage of the web-font mixin with variable interpolation
.replace(/@include web-font/,'@import url');
if (/\/variables.less$/.test(lessFile)) {
// 13. set default value of $bootstrap-sass-asset-helper to false
// 15. set default value of $bootstrap-sass-asset-helper to false
out = "$bootstrap-sass-asset-helper: false;\n" + out;
// 14. only assign variables if they haven't been previously set e.g. $var: #f00; > $var: #f00 !default;
// 16. only assign variables if they haven't been previously set e.g. $var: #f00; > $var: #f00 !default;
out = out.replace(/^(\$.*);/gm, '$1 !default;');
}
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Roboto:400,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Lato:400,700,400italic" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Lato:400,700,400italic" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=News+Cycle:400,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
@mixin shadow($width: 4px){
border-width: 0 1px $width 1px;
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Raleway:400,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Roboto:400,500" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Open+Sans:400,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
@mixin btn-shadow($color){
@include gradient-vertical-three-colors(lighten($color, 3%), $color, 6%, darken($color, 3%));
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
@mixin btn-shadow($color){
@include gradient-vertical-three-colors(lighten($color, 15%), $color, 50%, darken($color, 4%));
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Lato:300,400,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Ubuntu:400,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
......@@ -4,10 +4,7 @@
$web-font-path: "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700" !default;
@mixin web-font($path){
@import url("#{$path}");
}
@include web-font($web-font-path);
@import url($web-font-path);
// Navbar =====================================================================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment