Skip to content

Commit dbe97a4

Browse files
committed
Trying to move vars into the style
1 parent c067756 commit dbe97a4

1 file changed

Lines changed: 45 additions & 20 deletions

File tree

assets/style.scss

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,39 @@
77
//
88

99
@use "../_sass/_reset";
10-
@use "../_sass/_variables" as vars;
1110
@use "../_sass/_darcula";
1211
@use "../_sass/_svg-icons";
1312
// Syntax highlighting partial is still commented out
1413
//@use "../_sass/_highlights";
1514

1615
@import url('https://fonts.googleapis.com/css?family=Roboto');
1716

17+
//
18+
// VARIABLES
19+
//
20+
21+
// Colors
22+
$blue: #4183C4;
23+
24+
// Grays
25+
$black: #000;
26+
$darkerGray: #222;
27+
$darkGray: #333;
28+
$gray: #666;
29+
$lightGray: #eee;
30+
$white: #fff;
31+
32+
// Font stacks
33+
$helvetica: Helvetica, Arial, sans-serif;
34+
$helveticaNeue: "Helvetica Neue", Helvetica, Arial, sans-serif;
35+
$georgia: Georgia, serif;
36+
37+
// Mobile breakpoints
38+
@mixin mobile {
39+
@media screen and (max-width: 640px) {
40+
@content;
41+
}
42+
}
1843
/**************/
1944
/* BASE RULES */
2045
/**************/
@@ -43,7 +68,7 @@ body {
4368

4469
h1, h2, h3, h4, h5, h6 {
4570
font-family: -system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
46-
color: vars.$darkerGray;
71+
color: $darkerGray;
4772
font-weight: bold;
4873

4974
line-height: 1.7;
@@ -181,11 +206,11 @@ span[data-pullquote]:before {
181206
}
182207

183208
a {
184-
color: vars.$blue;
209+
color: $blue;
185210
text-decoration: none;
186211
cursor: pointer;
187212
&:hover, &:active {
188-
color: vars.$blue;
213+
color: $blue;
189214
}
190215
}
191216

@@ -266,17 +291,17 @@ p > img {
266291
}
267292

268293
.date {
269-
color: vars.$gray;
294+
color: $gray;
270295
}
271296

272297
// Specify the color of the selection
273298
::-moz-selection {
274-
color: vars.$black;
275-
background: vars.$lightGray;
299+
color: $black;
300+
background: $lightGray;
276301
}
277302
::selection {
278-
color: vars.$black;
279-
background: vars.$lightGray;
303+
color: $black;
304+
background: $lightGray;
280305
}
281306

282307
// Nicolas Gallagher's micro clearfix hack
@@ -305,7 +330,7 @@ p > img {
305330

306331
.masthead {
307332
padding: 20px 0;
308-
border-bottom: 1px solid vars.$lightGray;
333+
border-bottom: 1px solid $lightGray;
309334

310335
@include mobile {
311336
text-align: center;
@@ -344,9 +369,9 @@ p > img {
344369

345370
.site-name {
346371
margin: 0;
347-
color: vars.$darkGray;
372+
color: $darkGray;
348373
cursor: pointer;
349-
font-family: vars.$helveticaNeue;
374+
font-family: $helveticaNeue;
350375
font-weight: 300;
351376
font-size: 28px;
352377
letter-spacing: 1px;
@@ -359,7 +384,7 @@ p > img {
359384

360385
.site-description {
361386
margin: -5px 0 0 0;
362-
color: vars.$gray;
387+
color: $gray;
363388
font-size: 16px;
364389

365390
@include mobile {
@@ -370,7 +395,7 @@ p > img {
370395
nav {
371396
float: right;
372397
margin-top: 23px; // @TODO: Vertically middle align
373-
font-family: vars.$helveticaNeue;
398+
font-family: $helveticaNeue;
374399
font-size: 18px;
375400

376401
@include mobile {
@@ -382,14 +407,14 @@ nav {
382407

383408
a {
384409
margin-left: 20px;
385-
color: vars.$darkGray;
410+
color: $darkGray;
386411
text-align: right;
387412
font-weight: 300;
388413
letter-spacing: 1px;
389414

390415
@include mobile {
391416
margin: 0 10px;
392-
color: vars.$blue;
417+
color: $blue;
393418
}
394419
}
395420
}
@@ -400,7 +425,7 @@ nav {
400425

401426
.posts > .post {
402427
padding-bottom: 2em;
403-
border-bottom: 1px solid vars.$lightGray;
428+
border-bottom: 1px solid $lightGray;
404429
}
405430

406431
.posts > .post:last-child {
@@ -413,7 +438,7 @@ nav {
413438
margin: 1.8em .8em;
414439
/*border-left: 2px solid $gray;*/
415440
padding: 0.1em 1em;
416-
color: vars.$gray;
441+
color: $gray;
417442
font-size: 22px;
418443
font-style: italic;
419444
background-color: #ede1ff;
@@ -423,7 +448,7 @@ nav {
423448
margin: 1.8em .8em;
424449
/*border-left: 2px solid $gray;*/
425450
padding: 0.1em 1em;
426-
color: vars.$gray;
451+
color: $gray;
427452
font-size: 22px;
428453
font-style: italic;
429454
background-color: #ddffb5;;
@@ -453,7 +478,7 @@ nav {
453478
bottom: 0;
454479
width: 100%;
455480
height: 89px;
456-
background-color: vars.$lightGray;
481+
background-color: $lightGray;
457482
}
458483

459484
footer {

0 commit comments

Comments
 (0)