Skip to content

Commit 332bc36

Browse files
committed
Change px to rem
Change all px declaration to rem with the rem-calc function
1 parent c75e637 commit 332bc36

File tree

4 files changed

+45
-46
lines changed

4 files changed

+45
-46
lines changed

dist/sass/_colour.scss

+6-6
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ article figure {
6565
.orange {
6666

6767
#content {
68-
background: url('../img/logo_cut.png') no-repeat center 56px;
68+
background: url('../img/logo_cut.png') no-repeat center rem-calc(56);
6969
}
7070

7171
footer {
@@ -97,7 +97,7 @@ article figure {
9797
.blue {
9898

9999
#content {
100-
background: url('../img/logo_cut_blue.png') no-repeat center 56px;
100+
background: url('../img/logo_cut_blue.png') no-repeat center rem-calc(56);
101101
}
102102

103103
footer {
@@ -129,7 +129,7 @@ article figure {
129129
// green theme --------------------
130130
.green {
131131
#content {
132-
background: url('../img/logo_cut_green.png') no-repeat center 56px;
132+
background: url('../img/logo_cut_green.png') no-repeat center rem-calc(56);
133133
}
134134

135135
footer {
@@ -161,7 +161,7 @@ article figure {
161161
// yellow theme --------------------
162162
.yellow {
163163
#content {
164-
background: url('../img/logo_cut_yellow.png') no-repeat center 56px;
164+
background: url('../img/logo_cut_yellow.png') no-repeat center rem-calc(56);
165165
}
166166

167167
footer {
@@ -194,7 +194,7 @@ article figure {
194194
.gray {
195195

196196
#content {
197-
background: url('../img/logo_cut_gray.png') no-repeat center 56px;
197+
background: url('../img/logo_cut_gray.png') no-repeat center rem-calc(56);
198198
}
199199

200200
footer {
@@ -227,7 +227,7 @@ article figure {
227227
.lilac {
228228

229229
#content {
230-
background: url('../img/logo_cut_lilac.png') no-repeat center 56px;
230+
background: url('../img/logo_cut_lilac.png') no-repeat center rem-calc(56);
231231
}
232232

233233
footer {

dist/sass/_layout.scss

+28-29
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,38 @@ header section a {
1010
}
1111

1212
footer {
13-
padding-top: 90px;
14-
margin-top: 85px;
13+
padding-top: rem-calc(90);
14+
margin-top: rem-calc(85);
1515
}
1616

17-
1817
#nav {
19-
height: 65px;
18+
height: rem-calc(65);
2019
}
2120

2221
#logo {
23-
left: 20px;
24-
top: 20px;
22+
left: rem-calc(20);
23+
top: rem-calc(20);
2524
}
2625

2726
#meta-nav {
28-
right: 30px;
29-
top: 25px;
27+
right: rem-calc(30);
28+
top: rem-calc(25);
3029
}
3130

3231
#main-nav {
33-
top: 25px;
32+
top: rem-calc(25);
3433
}
3534

3635
#sub-nav {
37-
top: 65px;
38-
padding-top: 8px;
39-
padding-bottom: 5px;
40-
height: 24px;
36+
top: rem-calc(65);
37+
padding-top: rem-calc(8);
38+
padding-bottom: rem-calc(5);
39+
height: rem-calc(24);
4140
}
4241

4342
#logo,
4443
#meta-nav {
45-
width: 230px;
44+
width: rem-calc(230);
4645
}
4746

4847
// header section { div, nav, ul { float: left; } }
@@ -76,64 +75,64 @@ footer {
7675
}
7776

7877
.cb {
79-
width: 830px;
80-
padding: 35px 0 50px;
78+
width: rem-calc(830);
79+
padding: rem-calc(35 0 50);
8180

8281
&.teaser {
83-
padding: 0 0 60px;
82+
padding: rem-calc(0 0 60);
8483
}
8584

8685
article {
87-
width: 600px;
86+
width: rem-calc(600);
8887
float: left;
8988
}
9089

9190
aside {
92-
width: 180px;
91+
width: rem-calc(180);
9392
float: left;
94-
margin-right: 50px;
93+
margin-right: rem-calc(50);
9594
}
9695
}
9796

9897
#content {
99-
padding-top: 300px;
98+
padding-top: rem-calc(300);
10099
}
101100

102101
.teaser h1,
103102
.cb h2 {
104-
padding-left: 230px;
103+
padding-left: rem-calc(230);
105104
}
106105

107106
code {
108-
padding-top: 25px;
107+
padding-top: rem-calc(25);
109108
display: block;
110109
}
111110

112111
.grid-9 figure { // @todo: over think this rulest (better don't style elements)
113112
img {
114-
padding-bottom: 10px;
113+
padding-bottom: rem-calc(10);
115114
}
116115

117116
figcaption {
118-
padding-bottom: 30px;
117+
padding-bottom: rem-calc(30);
119118
}
120119
}
121120

122121
// grids
123122
.grid-9 {
124123
width: 100%;
125-
max-width: 600px;
124+
max-width: rem-calc(600);
126125
}
127126

128127
.grid-6 {
129128
width: 65%;
130-
max-width: 450px;
129+
max-width: rem-calc(450);
131130
}
132131

133132
.grid-3 {
134133
width: 32%;
135-
max-width: 170px;
136-
margin-right: 45px;
134+
max-width: rem-calc(170);
135+
margin-right: rem-calc(45);
137136
}
138137

139138
.grid-3:nth-child(3n) {

dist/sass/_modules.scss

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
.person-bio {
22
.grid-3 {
3-
margin: 5px 25px 0 0;
4-
max-width: 150px;
3+
margin: rem-calc(5 25 0 0);
4+
max-width: rem-calc(150);
55
}
66

77
.bio-link {
8-
padding-top: 129px;
8+
padding-top: rem-calc(129);
99
}
1010
}
1111

1212
.friends {
1313

1414
.grid-3 {
15-
margin-bottom: 80px;
15+
margin-bottom: rem-calc(80);
1616

1717
figure {
1818
text-align: left;
19-
height: 175px;
19+
height: rem-calc(175);
2020
}
2121
}
2222
}
@@ -26,12 +26,12 @@
2626
}
2727

2828
.sitemap-item {
29-
width: 260px;
30-
margin-right: 25px;
29+
width: rem-calc(260);
30+
margin-right: rem-calc(25);
3131
text-align: right;
3232
font-size: .938em;
3333
line-height: 1.6;
34-
padding-bottom: 25px;
34+
padding-bottom: rem-calc(25);
3535

3636
&:last-child {
3737
margin-right: 0;
@@ -43,7 +43,7 @@ code {
4343
white-space: normal !important;
4444
border: 0 none !important;
4545
background-color: transparent !important;
46-
margin-top: 25px !important;
46+
margin-top: rem-calc(25) !important;
4747
}
4848

4949

dist/sass/_typo.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ body {
2424
font-size: .938em;
2525

2626
li {
27-
margin-right: 9px;
27+
margin-right: rem-calc(9);
2828
}
2929
}
3030

@@ -44,7 +44,7 @@ a:hover,
4444

4545
#nav a,
4646
#meta-nav li {
47-
margin-right: 9px;
47+
margin-right: rem-calc(9);
4848
}
4949

5050
#nav a:last-child,

0 commit comments

Comments
 (0)