From 5a74448e32969a38c87ec43f8f1d51dc31283a3b Mon Sep 17 00:00:00 2001 From: Ashley Nolan Date: Thu, 29 Aug 2013 15:28:01 +0100 Subject: [PATCH] Updating across scss to use leading line-height values rather than line-height rem mixin. May need to adjust on certain elements, but should be fairly good across the board --- scss/_code.scss | 2 +- scss/_components.scss | 4 ++-- scss/_forms.scss | 8 ++++---- scss/_tables.scss | 2 +- scss/_typography.scss | 23 +++-------------------- 5 files changed, 11 insertions(+), 28 deletions(-) diff --git a/scss/_code.scss b/scss/_code.scss index 485667b5..f12f7830 100644 --- a/scss/_code.scss +++ b/scss/_code.scss @@ -27,7 +27,7 @@ pre { display: block; padding: ($base-line-height - 1) / 2 + px; margin: 0 0 ($base-line-height / 2 + px); - @include line-height($base-line-height); + line-height: $base-leading; color: $color-pre; background-color: $color-pre-background; border: 1px solid #ccc; // fallback for IE7-8 diff --git a/scss/_components.scss b/scss/_components.scss index 1f44460c..80637847 100644 --- a/scss/_components.scss +++ b/scss/_components.scss @@ -244,7 +244,7 @@ ul.centred, ul.centered { position: relative; top: -2px; right: -21px; - line-height: $base-line-height + px; + line-height: $base-leading; } } @@ -301,7 +301,7 @@ ul.centred, ul.centered { float: right; font-size: 20px; font-weight: bold; - line-height: $base-line-height + px; + line-height: $base-leading; color: #000; text-shadow: 0 1px 0 rgba(255,255,255,1); @include opacity(20); diff --git a/scss/_forms.scss b/scss/_forms.scss index 7bc8bb2d..3ec6428f 100644 --- a/scss/_forms.scss +++ b/scss/_forms.scss @@ -45,7 +45,7 @@ legend { padding: 0; margin-bottom: $base-line-height + px; @include font-size($base-font-size * 1.5); - @include line-height($base-line-height * 2); + line-height: $base-leading; color: $label-colour; border: 0; border-bottom: 1px solid #eee; @@ -65,7 +65,7 @@ button, select, textarea { @include font-size($base-font-size); - @include line-height($base-line-height); + line-height: $base-leading; font-weight: normal; vertical-align: baseline; *vertical-align: middle; @@ -116,7 +116,7 @@ select, padding: 4px; margin-bottom: 9px; @include font-size($base-font-size); - @include line-height($base-line-height); + line-height: $base-leading; color: $input-colour; background-color: #FFF; border: 1px solid $input-border; @@ -587,7 +587,7 @@ textarea { height: $base-line-height + px; padding: 4px 5px; font-weight: normal; - @include line-height($base-line-height); + line-height: $base-leading; text-align: center; text-shadow: 0 1px 0 #fff; vertical-align: middle; diff --git a/scss/_tables.scss b/scss/_tables.scss index a7cc87e7..1d756cf3 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -24,7 +24,7 @@ table { & th, & td { padding: 8px; - @include line-height($base-line-height); + line-height: $base-leading; text-align: left; vertical-align: top; border-top: 1px solid $table-border; diff --git a/scss/_typography.scss b/scss/_typography.scss index 7fe34d03..6fd6bc21 100644 --- a/scss/_typography.scss +++ b/scss/_typography.scss @@ -39,7 +39,7 @@ html { body { font-family: $base-font-family; @include font-size($base-font-size); - @include line-height($base-line-height); + line-height: $base-leading; color: $color-text; background-color: $color-background; @@ -58,7 +58,6 @@ body { p { font-family: $base-font-family; @include font-size($base-font-size); - @include line-height($base-line-height); margin-top: 0; margin-bottom: $base-line-height + px; @@ -90,21 +89,19 @@ h1, h2, h3, h4, h5, h6 { h1, .h1, .alpha { @include font-size(51); - @include line-height($base-line-height * 2); + line-height: $base-leading * 2; margin-top: $base-line-height + px; margin-bottom: ($base-line-height * 2) + px; } h2, .h2, .beta { @include font-size(28); - @include line-height($base-line-height * 2); margin-top: ($base-line-height * 2) + px; margin-bottom: $base-line-height + px; } h3, .h3, .gamma { @include font-size(21); - @include line-height($base-line-height); margin-top: $base-line-height + px; margin-bottom: 0px; } @@ -112,7 +109,6 @@ h3, .h3, .gamma { h4, .h4,, .delta, h5, .h5, .epsilon, h6, .h6, .zeta { - @include line-height($base-line-height); margin-top: 0; margin-bottom: 0; } @@ -182,10 +178,6 @@ ul, ol { } } - & li { - @include line-height($base-line-height); - } - & ul, & ol { margin-bottom: 0; @@ -206,14 +198,8 @@ dl { margin-bottom: $base-line-height + px; } -dt, -dd { - @include line-height($base-line-height); -} - dt { font-weight:$bold-font-weight; - @include line-height($base-line-height - 1); // fix jank Helvetica Neue font bug // Horizontal layout (like forms) .dl-horizontal & { @@ -275,12 +261,10 @@ blockquote { margin-bottom: 0; @include font-size($base-font-size); font-weight: 300; - @include line-height($base-line-height * 1.25); } & small { display: block; - @include line-height($base-line-height); color: lighten(#000, 70%); &:before { @@ -315,7 +299,6 @@ blockquote { address { display: block; margin-bottom: $base-line-height + px; - @include line-height($base-line-height); font-style: normal; } @@ -343,7 +326,7 @@ mark { // gist.github.com/413930 sub, sup { font-size: 75%; - @include line-height(0); + line-height: 0; position: relative; vertical-align: baseline; }