Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
masonstrap
Commits
ceb6bc5d
Commit
ceb6bc5d
authored
Sep 23, 2015
by
Thomas Park
Browse files
Merge pull request #516 from guru-digital/gh-pages
Fix google font import issue with scss
parents
f6d93c74
f6e602e4
Changes
15
Hide whitespace changes
Inline
Side-by-side
Gruntfile.js
View file @
ceb6bc5d
...
...
@@ -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
))
{
// 1
3
. set default value of $bootstrap-sass-asset-helper to false
// 1
5
. set default value of $bootstrap-sass-asset-helper to false
out
=
"
$bootstrap-sass-asset-helper: false;
\n
"
+
out
;
// 1
4
. only assign variables if they haven't been previously set e.g. $var: #f00; > $var: #f00 !default;
// 1
6
. only assign variables if they haven't been previously set e.g. $var: #f00; > $var: #f00 !default;
out
=
out
.
replace
(
/^
(\$
.*
)
;/gm
,
'
$1 !default;
'
);
}
...
...
cosmo/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
cyborg/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
darkly/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
flatly/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
journal/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
lumen/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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
;
...
...
paper/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
readable/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
sandstone/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
simplex/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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%
));
...
...
spacelab/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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%
));
...
...
superhero/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
united/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
yeti/_bootswatch.scss
View file @
ceb6bc5d
...
...
@@ -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 =====================================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment