Skip to content

Commit 07c2b05

Browse files
committed
Stylesheet clean-up
1 parent b0d6ec8 commit 07c2b05

7 files changed

+44
-35
lines changed

src/scss/_config.scss

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
// Set all your configuration variables here!
44

55
// Width of the overall site as well as the left and right content columns
6-
$width-site: 1000px;
7-
$width-left: 650px;
8-
$width-right: 350px;
6+
$width-site: 1000px;
7+
$width-left: 650px;
8+
$width-right: 350px;
99

1010
// Breakpoints
11-
$break-small: 480px;
12-
$break-medium: 620px;
13-
$break-large: 800px;
11+
$break-small: 480px;
12+
$break-medium: 620px;
13+
$break-large: 800px;
1414

1515
// A standard margin
16-
$spacer: 30px;
16+
$spacer: 30px;
1717

1818
// A modest palette; see `_library.scss` for the color() function
1919
$color: (

src/scss/_general.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ html {
44
font-size: 18px;
55
}
66
body {
7-
color: color("text");
7+
color: color(text);
88
font-family: "Noto Serif", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
99
line-height: 1.44444;
1010
}
@@ -24,10 +24,10 @@ a {
2424
transition: color .8s ease-out;
2525
.wrap-content &,
2626
.inline-menu & {
27-
color: color("link");
27+
color: color(link);
2828
}
2929
.wrap-sidebar & {
30-
color: color("link-muted");
30+
color: color(link-muted);
3131
}
3232
}
3333
figure {

src/scss/_helpers.scss

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@
1010
@include scut-hide-visually;
1111
}
1212
%spacer-above {
13-
margin-top: $spacer;
13+
margin-top: spacer();
1414
}
1515
%spacer-above-2 {
16-
margin-top: $spacer*2;
16+
margin-top: spacer(2);
1717
}
1818
%spacer-above-3 {
19-
margin-top: $spacer*3;
19+
margin-top: spacer(3);
2020
}
2121
%spacer-below {
22-
margin-bottom: $spacer;
22+
margin-bottom: spacer();
2323
}
2424
%spacer-below-2 {
25-
margin-bottom: $spacer*2;
25+
margin-bottom: spacer(2);
2626
}
2727
%spacer-below-3 {
28-
margin-bottom: $spacer*3;
28+
margin-bottom: spacer(3);
2929
}

src/scss/_layout.scss

+16-16
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,51 @@
66
// A general wrapper for various site elements
77
%wrap {
88
box-sizing: border-box; // Makes life a little easier
9-
padding: 0 $spacer 0 $spacer;
9+
padding: 0 spacer() 0 spacer();
1010
}
1111
.wrap-header {
1212
@extend %wrap;
13-
background: color("header-background");
14-
padding-bottom: $spacer/2;
15-
padding-top: $spacer/2;
13+
background: color(header-background);
14+
padding-bottom: spacer(1/2);
15+
padding-top: spacer(1/2);
1616
@include media-above($break-large) {
17-
padding-left: $spacer*2;
18-
padding-right: $spacer*2;
17+
padding-left: spacer(2);
18+
padding-right: spacer(2);
1919
}
2020
}
2121
.wrap-main { // Wrapper around content and sidebar
2222
@extend %clearfix;
2323
@include media-above($break-large) {
2424
@include scut-center-block($width-site);
25-
padding: 0 $spacer*2 0 $spacer*2;
25+
padding: 0 spacer(2) 0 spacer(2);
2626
}
2727
}
2828
.wrap-content {
2929
@extend %wrap;
30-
padding: $spacer;
30+
padding: spacer();
3131
@include media-above($break-large) {
3232
float: left;
3333
padding-left: 0;
34-
padding-right: $spacer;
35-
width: percentage( ( $width-left + $spacer ) / $width-site );
34+
padding-right: spacer();
35+
width: percentage( ( $width-left + spacer() ) / $width-site );
3636
}
3737
}
3838
.wrap-sidebar {
3939
@extend %wrap;
40-
padding: $spacer;
40+
padding: spacer();
4141
@include media-above($break-large) {
4242
float: right;
43-
padding-left: $spacer;
43+
padding-left: spacer();
4444
padding-right: 0;
45-
width: percentage( 1 - ( ( $width-left + $spacer ) / $width-site ) );
45+
width: percentage( 1 - ( ( $width-left + spacer() ) / $width-site ) );
4646
}
4747
}
4848
.wrap-footer {
4949
@extend %wrap;
50-
padding-bottom: $spacer;
50+
padding-bottom: spacer();
5151
@include media-above($break-large) {
52-
padding-left: $spacer*2;
53-
padding-right: $spacer*2;
52+
padding-left: spacer(2);
53+
padding-right: spacer(2);
5454
}
5555
}
5656
.site-header,

src/scss/_library.scss

+9
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@
3434

3535

3636

37+
// == LAYOUT == //
38+
39+
// Margins and positioning helper function
40+
@function spacer($val: 1) {
41+
@return $spacer * $val + 0px;
42+
}
43+
44+
45+
3746
// == PALETTE == //
3847

3948
// A simple function to retrieve a color from the array; adapted from http://erskinedesign.com/blog/friendlier-colour-names-sass-maps/

src/scss/_menus.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
padding: 0;
1010
& > li {
1111
float: left;
12-
margin-right: $spacer/2;
12+
margin-right: spacer(1/2);
1313
&:last-of-type {
1414
margin-right: 0;
1515
}

src/scss/_navigation.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
.nav-previous {
88
box-sizing: border-box;
99
float: left;
10-
padding-right: $spacer/2;
10+
padding-right: spacer(1/2);
1111
width: 50%;
1212
}
1313
.nav-next {
1414
box-sizing: border-box;
1515
float: right;
16-
padding-left: $spacer/2;
16+
padding-left: spacer(1/2);
1717
text-align: right;
1818
width: 50%;
1919
}

0 commit comments

Comments
 (0)