Commit 913f54b9 authored by Thomas Park's avatar Thomas Park
Browse files

set web font path as variable that can be overridden, closes #507

parent 884b1111
......@@ -231,11 +231,13 @@ grunt.registerTask('build_scss', 'build a regular theme from scss', function(the
.replace(/bootstrap\/less\//g, 'bootstrap-sass-official/assets/stylesheets/')
.replace(/\.less/g, '')
// 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/");');
.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;');
if (/\/variables.less$/.test(lessFile)) {
// 12. set default value of $bootstrap-sass-asset-helper to false
// 13. set default value of $bootstrap-sass-asset-helper to false
out = "$bootstrap-sass-asset-helper: false;\n" + out;
// 13. only assign variables if they haven't been previously set e.g. $var: #f00; > $var: #f00 !default;
// 14. only assign variables if they haven't been previously set e.g. $var: #f00; > $var: #f00 !default;
out = out.replace(/^(\$.*);/gm, '$1 !default;');
}
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700");
$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);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700");
@web-font-path: "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700";
.web-font(@path) {
@import url("@{path}");
}
.web-font(@web-font-path);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Roboto:400,700");
$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);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Roboto:400,700");
@web-font-path: "https://fonts.googleapis.com/css?family=Roboto:400,700";
.web-font(@path) {
@import url("@{path}");
}
.web-font(@web-font-path);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Lato:400,700,400italic");
$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);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Lato:400,700,400italic");
@web-font-path: "https://fonts.googleapis.com/css?family=Lato:400,700,400italic";
.web-font(@path) {
@import url("@{path}");
}
.web-font(@web-font-path);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Lato:400,700,400italic");
$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);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Lato:400,700,400italic");
@web-font-path: "https://fonts.googleapis.com/css?family=Lato:400,700,400italic";
.web-font(@path) {
@import url("@{path}");
}
.web-font(@web-font-path);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=News+Cycle:400,700");
$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);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=News+Cycle:400,700");
@web-font-path: "https://fonts.googleapis.com/css?family=News+Cycle:400,700";
.web-font(@path) {
@import url("@{path}");
}
.web-font(@web-font-path);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic");
$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);
@mixin shadow($width: 4px){
border-width: 0 1px $width 1px;
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic");
@web-font-path: "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic";
.web-font(@path) {
@import url("@{path}");
}
.web-font(@web-font-path);
.shadow (@width: 4px) {
border-width: 0 1px @width 1px;
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700");
$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);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700");
@web-font-path: "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700";
.web-font(@path) {
@import url("@{path}");
}
.web-font(@web-font-path);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Raleway:400,700");
$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);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Raleway:400,700");
@web-font-path: "https://fonts.googleapis.com/css?family=Raleway:400,700";
.web-font(@path) {
@import url("@{path}");
}
.web-font(@web-font-path);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");
$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);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");
@web-font-path: "https://fonts.googleapis.com/css?family=Roboto:400,500";
.web-font(@path) {
@import url("@{path}");
}
.web-font(@web-font-path);
// Navbar =====================================================================
......
......@@ -2,7 +2,12 @@
// Bootswatch
// -----------------------------------------------------
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,700");
$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);
@mixin btn-shadow($color){
@include gradient-vertical-three-colors(lighten($color, 3%), $color, 6%, darken($color, 3%));
......
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