From 7501aab7977d8fbced1f7e27b9a8e220c7e8be91 Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Thu, 8 Oct 2015 12:37:05 +0200 Subject: [PATCH] Add font family variable --- butterfly/sass/_font.sass | 15 ++++++++------- butterfly/sass/_variables.sass | 6 +++++- butterfly/static/main.css | 4 +++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/butterfly/sass/_font.sass b/butterfly/sass/_font.sass index 82f50f6..8c43bf9 100644 --- a/butterfly/sass/_font.sass +++ b/butterfly/sass/_font.sass @@ -17,15 +17,16 @@ $weights: (ExtraLight 100) (Light 300) (Regular 400) (Medium 500) (Semibold 600) (Bold 700) (Black 900) -@each $weight in $weights - $weight_name: nth($weight, 1) +@if $font-family == "SourceCodePro" + @each $weight in $weights + $weight_name: nth($weight, 1) - @font-face - font-family: "SourceCodePro" - src: url("/static/fonts/SourceCodePro-#{$weight_name}.otf") format("woff") - font-weight: nth($weight, 2) + @font-face + font-family: "SourceCodePro" + src: url("/static/fonts/SourceCodePro-#{$weight_name}.otf") format("woff") + font-weight: nth($weight, 2) body - font-family: "SourceCodePro" + font-family: $font-family font-size: $font-size line-height: 1.2 diff --git a/butterfly/sass/_variables.sass b/butterfly/sass/_variables.sass index c4e4039..2021f15 100644 --- a/butterfly/sass/_variables.sass +++ b/butterfly/sass/_variables.sass @@ -14,7 +14,8 @@ /* Variables */ -/** Font Size +/** Font +$font-family: "SourceCodePro" !default $font-size: 1em !default /** Colors */ @@ -32,7 +33,10 @@ $reverse-transparent: $bg !default $colors: #2e3436, #cc0000, #4e9a06, #c4a000, #3465a4, #75507b, #06989a, #d3d7cf, #555753, #ef2929, #8ae234, #fce94f, #729fcf, #ad7fa8, #34e2e2, #eeeeec !default /** Text effects */ + +/* The shadow is the size of the blur (in px for instance) $shadow: 0 !default +/* The shadow alpha is the opacity of the shadow $shadow-alpha: 0 !default /** Scroll */ diff --git a/butterfly/static/main.css b/butterfly/static/main.css index 2ff33ee..afb4f77 100644 --- a/butterfly/static/main.css +++ b/butterfly/static/main.css @@ -27,12 +27,14 @@ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* Variables */ -/** Font Size */ +/** Font */ /** Colors */ /* Foreground */ /* Background */ /* 16 Colors in this orders :Black, Red, Green, Yellow, Blue, Magenta, Cyan, White, Bright Black, Bright Red, Bright Green, Bright Yellow, Bright Blue, Bright Magenta, Bright Cyan, Bright White */ /** Text effects */ +/* The shadow is the size of the blur (in px for instance) */ +/* The shadow alpha is the opacity of the shadow */ /** Scroll */ /** Popup */ /* These are all imported files */