From 580db46d4c4a34eccb6c6449bcf9698964db3b79 Mon Sep 17 00:00:00 2001 From: Grant Gaduet Date: Thu, 11 Oct 2012 09:44:47 -0700 Subject: [PATCH] Adding variables and SCSS to allow specifying font-style for body and header text --- scss/foundation/_settings.scss | 2 ++ scss/foundation/common/_globals.scss | 2 +- scss/foundation/common/_typography.scss | 3 ++- scss/foundation/components/modules/_buttons.scss | 2 +- templates/project/scss/_settings.scss | 2 ++ test/scss/_settings.scss | 2 ++ 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scss/foundation/_settings.scss b/scss/foundation/_settings.scss index dadddf956..86e25f438 100644 --- a/scss/foundation/_settings.scss +++ b/scss/foundation/_settings.scss @@ -38,9 +38,11 @@ $darkEdge: rgba(#000, .2) !default; $headerFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default; $headerFontWeight: bold !default; +$headerFontStyle: normal !default; $headerFontColor: #222 !default; $bodyFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default; $bodyFontWeight: normal !default; +$bodyFontStyle: normal !default; $bodyFontColor: $txtColor !default; // Button Settings diff --git a/scss/foundation/common/_globals.scss b/scss/foundation/common/_globals.scss index 08cb408a8..3529c4d36 100644 --- a/scss/foundation/common/_globals.scss +++ b/scss/foundation/common/_globals.scss @@ -4,7 +4,7 @@ * { @include box-sizing(border-box); } html { font-size: 62.5%; } - body { background: $white; font-family: $bodyFontFamily; font-size: ms(0); line-height: 1; color: $bodyFontColor; position: relative; -webkit-font-smoothing: antialiased; } + body { background: $white; font-family: $bodyFontFamily; font-weight: $bodyFontWeight; font-style: $bodyFontStyle; font-size: ms(0); line-height: 1; color: $bodyFontColor; position: relative; -webkit-font-smoothing: antialiased; } /* Links ---------------------- */ diff --git a/scss/foundation/common/_typography.scss b/scss/foundation/common/_typography.scss index ba476edfd..01f940661 100644 --- a/scss/foundation/common/_typography.scss +++ b/scss/foundation/common/_typography.scss @@ -7,7 +7,7 @@ direction: $textDirection; } - p { font-family: $bodyFontFamily; font-weight: $bodyFontWeight; font-size: ms(0); line-height: 1.6; margin-bottom: ms(1); + p { font-family: $bodyFontFamily; font-weight: $bodyFontWeight; font-style: $bodyFontStyle; font-size: ms(0); line-height: 1.6; margin-bottom: ms(1); &.lead { font-size: ms(0) * 1.25; line-height: 1.6; margin-bottom: ms(1); } } aside p { font-size: ms(0) - 1; line-height: 1.35; font-style: italic; } @@ -15,6 +15,7 @@ h1, h2, h3, h4, h5, h6 { font-family: $headerFontFamily; font-weight: $headerFontWeight; + font-style: $headerFontStyle; color: $headerFontColor; text-rendering: optimizeLegibility; line-height: 1.1; diff --git a/scss/foundation/components/modules/_buttons.scss b/scss/foundation/components/modules/_buttons.scss index 22ab0a7ea..8dc420b35 100644 --- a/scss/foundation/components/modules/_buttons.scss +++ b/scss/foundation/components/modules/_buttons.scss @@ -3,7 +3,7 @@ /* Normal Buttons ---------------------- */ - .button { width: auto; background: $mainColor; border: 1px solid darken(($mainColor), 15%); @include box-shadow(0 1px 0 $shinyEdge inset); color: $white; cursor: pointer; display: inline-block; font-family: $bodyFontFamily; font-size: ms(0); font-weight: bold; line-height: 1; margin: 0; outline: none; padding: $btnBase ($btnBase * 2) ($btnBase + 1); position: relative; text-align: center; text-decoration: none; @include single-transition(background-color, .15s, ease-in-out); + .button { width: auto; background: $mainColor; border: 1px solid darken(($mainColor), 15%); @include box-shadow(0 1px 0 $shinyEdge inset); color: $white; cursor: pointer; display: inline-block; font-family: $bodyFontFamily; font-weight: $bodyFontWeight; font-style: $bodyFontStyle; font-size: ms(0); line-height: 1; margin: 0; outline: none; padding: $btnBase ($btnBase * 2) ($btnBase + 1); position: relative; text-align: center; text-decoration: none; @include single-transition(background-color, .15s, ease-in-out); /* Hovers */ &:hover { color: $white; background-color: darken(($mainColor), 10%); } diff --git a/templates/project/scss/_settings.scss b/templates/project/scss/_settings.scss index 685e7c6ca..4e9c06368 100644 --- a/templates/project/scss/_settings.scss +++ b/templates/project/scss/_settings.scss @@ -30,9 +30,11 @@ // $headerFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; // $headerFontWeight: bold; +// $headerFontStyle: normal !default; // $headerFontColor: #222; // $bodyFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; // $bodyFontWeight: normal; +// $bodyFontStyle: normal !default; // $bodyFontColor: $txtColor; // Button Settings diff --git a/test/scss/_settings.scss b/test/scss/_settings.scss index c766b82d5..a081cd7e4 100644 --- a/test/scss/_settings.scss +++ b/test/scss/_settings.scss @@ -40,9 +40,11 @@ // $headerFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default; // $headerFontWeight: bold !default; +// $headerFontStyle: normal !default; // $headerFontColor: #222 !default; // $bodyFontFamily: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default; // $bodyFontWeight: normal !default; +// $bodyFontStyle: normal !default; // $bodyFontColor: $txtColor !default; // // Button Settings -- 2.47.3