Skip to content

Commit

Permalink
Updating across scss to use leading line-height values rather than li…
Browse files Browse the repository at this point in the history
…ne-height rem mixin. May need to adjust on certain elements, but should be fairly good across the board
  • Loading branch information
ashleynolan committed Aug 29, 2013
1 parent f56e18c commit 5a74448
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 28 deletions.
2 changes: 1 addition & 1 deletion scss/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scss/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ ul.centred, ul.centered {
position: relative;
top: -2px;
right: -21px;
line-height: $base-line-height + px;
line-height: $base-leading;
}
}

Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions scss/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion scss/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
23 changes: 3 additions & 20 deletions scss/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down Expand Up @@ -90,29 +89,26 @@ 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;
}

h4, .h4,, .delta,
h5, .h5, .epsilon,
h6, .h6, .zeta {
@include line-height($base-line-height);
margin-top: 0;
margin-bottom: 0;
}
Expand Down Expand Up @@ -182,10 +178,6 @@ ul, ol {
}
}

& li {
@include line-height($base-line-height);
}

& ul,
& ol {
margin-bottom: 0;
Expand All @@ -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 & {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -315,7 +299,6 @@ blockquote {
address {
display: block;
margin-bottom: $base-line-height + px;
@include line-height($base-line-height);
font-style: normal;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 5a74448

Please sign in to comment.