diff --git a/_config.yml b/_config.yml index e856ea99a4..f5f83a7536 100644 --- a/_config.yml +++ b/_config.yml @@ -434,8 +434,6 @@ github_banner: # --------------------------------------------------------------- font: - # Use custom fonts families or not. - # Depended options: `external` and `family`. enable: false # Uri of fonts host, e.g. //fonts.googleapis.com (Default). diff --git a/source/css/_variables/base.styl b/source/css/_variables/base.styl index a2ed7933f2..915a825147 100644 --- a/source/css/_variables/base.styl +++ b/source/css/_variables/base.styl @@ -85,7 +85,7 @@ $font-weight-bolder = 700; // Font size $font-size-base = 1em; -$font-size-base = unit(hexo-config('font.global.size'), em) if hexo-config('font.global.size') is a 'unit'; +$font-size-base = unit(hexo-config('font.global.size'), em) if hexo-config('font.enable') and hexo-config('font.global.size') is a 'unit'; $font-size-smallest = .75em; $font-size-smaller = .8125em; $font-size-small = .875em; @@ -98,7 +98,7 @@ $font-size-largest = 1.375em; // Headings font size $font-size-headings-step = .125em; $font-size-headings-base = 1.625em; -$font-size-headings-base = unit(hexo-config('font.headings.size'), em) if hexo-config('font.headings.size') is a 'unit'; +$font-size-headings-base = unit(hexo-config('font.headings.size'), em) if hexo-config('font.enable') and hexo-config('font.headings.size') is a 'unit'; // Global line height @@ -199,7 +199,7 @@ $brand-hover-color = white; $brand-bg = $black-deep; $font-size-title = $font-size-largest; -$font-size-title = unit(hexo-config('font.title.size'), em) if hexo-config('font.title.size') is a 'unit'; +$font-size-title = unit(hexo-config('font.title.size'), em) if hexo-config('font.enable') and hexo-config('font.title.size') is a 'unit'; $font-size-subtitle = $font-size-smaller; $subtitle-color = $grey-dark; $site-subtitle-color = $grey-dark;