Skip to content

Commit 631357b

Browse files
committed
Replace color variables file with settings file that has a more extensive set of options daviddarnes#44
1 parent 396e563 commit 631357b

File tree

4 files changed

+61
-45
lines changed

4 files changed

+61
-45
lines changed

_sass/_colors.scss

-10
This file was deleted.

_sass/_settings.scss

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Background colours
2+
$backgroundColour: #fff;
3+
$codeBackgroundColour: #f4f4f4;
4+
$featureBackgroundColour: #eee;
5+
$accentColour: #05bf85;
6+
7+
// Text colours
8+
$headingColour: #333;
9+
$bodyColour: #111;
10+
$linkColour: #05bf85;
11+
$hoverColour: darken($linkColour, 10%);
12+
$captionColour: #aaa;
13+
$white: #fff;
14+
15+
// Typography
16+
$bodytype: (
17+
font-family: 'Georgia, serif',
18+
regular: 400,
19+
bold: 700,
20+
italic: italic,
21+
cap-height: 0.66
22+
);
23+
24+
$headingtype: (
25+
font-family: 'Helvetica, sans-serif',
26+
regular: 400,
27+
bold: 700,
28+
cap-height: 0.66
29+
);
30+
31+
$monospacetype: (
32+
font-family: 'Menlo, monospace',
33+
regular: 400,
34+
cap-height: 0.68
35+
);
36+
37+
// Font import, if you're using a non-standard web font
38+
// @import url('https://fonts.googleapis.com/css?family=Roboto:400,700');

_sass/sassline-base/_variables.scss

-12
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,3 @@ $white: #FFFFFF !default;
9494
// Background colours.
9595
$backgroundColour: #FCFCFC !default;
9696
$codeBackgroundColour: #F5F4F2 !default;
97-
98-
99-
// Alembic reassigned variables
100-
$headingColour: $color__site--heading;
101-
$bodyColour: $color__site--body;
102-
$linkColour: $color__site--link;
103-
$hoverColour: $color__site--link--hover;
104-
$captionColour: $color__site--captions;
105-
$white: #fff;
106-
107-
$backgroundColour: $color__site--background;
108-
$codeBackgroundColour: darken($color__site--background, 5%);

assets/styles.scss

+23-23
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: false
55

66
// Frameworks & Imports
77
@charset "utf-8";
8-
@import "colors";
8+
@import "settings";
99
@import "normalize";
1010
@import "sassline-base";
1111
@import "syntax";
@@ -14,8 +14,8 @@ title: false
1414

1515
// Structural elements
1616
body {
17-
background: $color__site--background;
18-
color: $color__site--body;
17+
background: $backgroundColour;
18+
color: $bodyColour;
1919
height: 100%;
2020
display: flex;
2121
@include flex-direction(column);
@@ -52,7 +52,7 @@ body {
5252
padding-bottom: .4rem;
5353
margin-bottom: 1.6rem;
5454
text-align: center;
55-
background: $color__site--accent;
55+
background: $featureBackgroundColour;
5656
background-size: cover;
5757
background-position: center;
5858
@include flexbox;
@@ -75,16 +75,16 @@ body {
7575

7676
.small {
7777
padding-top: .8rem;
78-
color: $color__site--captions;
78+
color: $captionColour;
7979
display: inline-block;
8080
}
8181

8282
.footer {
83-
background: lighten(invert($color__site--background), 15%);
83+
background: lighten(invert($backgroundColour), 15%);
8484
a {
85-
color: invert($color__site--heading);
85+
color: darken($backgroundColour, 15%);
8686
&:hover {
87-
color: lighten(invert($color__site--body), 15%);
87+
color: $backgroundColour;
8888
}
8989
}
9090
}
@@ -95,7 +95,7 @@ body {
9595
&--paginator {
9696
@include flexbox;
9797
@include justify-content(space-between);
98-
color: $color__site--captions;
98+
color: $captionColour;
9999
text-align: center;
100100
}
101101
&--social {
@@ -212,7 +212,7 @@ body {
212212
}
213213
&--current {
214214
a {
215-
color: $color__site--link--current;
215+
opacity: 0.5;
216216
}
217217
}
218218
}
@@ -227,7 +227,7 @@ body {
227227
display: inline-block;
228228
transition: fill .1s;
229229
&:hover {
230-
fill: darken($color__site--link, 10%);
230+
fill: darken($linkColour, 10%);
231231
}
232232
}
233233
}
@@ -334,7 +334,7 @@ button,
334334
.button {
335335
cursor: pointer;
336336
display: inline-block;
337-
background: $color__site--accent;
337+
background: $accentColour;
338338
position: relative;
339339
transition: box-shadow .1s;
340340
will-change: box-shadow;
@@ -355,7 +355,7 @@ input,
355355
textarea {
356356
&:focus,
357357
&:hover:focus {
358-
outline: solid .12rem invert($color__site--accent);
358+
outline: solid .12rem invert($accentColour);
359359
}
360360
}
361361

@@ -368,9 +368,9 @@ input[type="email"],
368368
input[type="search"],
369369
textarea {
370370
width: 100%;
371-
border: 1px solid $color__site--captions;
371+
border: 1px solid $captionColour;
372372
&:hover {
373-
border-color: darken($color__site--captions, 20%);
373+
border-color: darken($captionColour, 20%);
374374
}
375375
}
376376

@@ -395,21 +395,21 @@ pre code {
395395
}
396396

397397
::-webkit-input-placeholder {
398-
color: darken($color__site--captions, 30%);
398+
color: darken($captionColour, 30%);
399399
}
400400
::-moz-placeholder {
401-
color: darken($color__site--captions, 30%);
401+
color: darken($captionColour, 30%);
402402
}
403403
:-ms-input-placeholder {
404-
color: darken($color__site--captions, 30%);
404+
color: darken($captionColour, 30%);
405405
}
406406
:-moz-placeholder {
407-
color: darken($color__site--captions, 30%);
407+
color: darken($captionColour, 30%);
408408
}
409409

410410
::selection {
411-
background: $color__site--heading;
412-
color: $color__site--background;
411+
background: invert($backgroundColour);
412+
color: $backgroundColour;
413413
text-shadow: none;
414414
}
415415

@@ -419,12 +419,12 @@ pre code {
419419
button {
420420
background-image: none;
421421
text-shadow: none;
422-
color: lighten(invert($color__site--body), 15%);
422+
color: $backgroundColour;
423423
&:hover,
424424
&:active,
425425
&:focus {
426426
background-image: none;
427-
color: lighten(invert($color__site--body), 15%);
427+
color: $backgroundColour;
428428
}
429429
}
430430
hr {

0 commit comments

Comments
 (0)