Skip to content

Commit b139a6a

Browse files
committed
Fix colours
1 parent 02718d6 commit b139a6a

File tree

5 files changed

+32
-31
lines changed

5 files changed

+32
-31
lines changed

_includes/theme-toggle.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="toggleWrapper">
2-
<input type="checkbox" class="dn" id="theme-toggle" onclick="modeSwitcher()"/>
2+
<input type="checkbox" class="dn" id="theme-toggle" onclick="modeSwitcher()" checked />
33
<label for="theme-toggle" class="toggle">
44
<span class="toggle__handler">
55
<span class="crater crater--1"></span>
@@ -22,22 +22,26 @@
2222
const userPrefers = getComputedStyle(document.documentElement).getPropertyValue('content');
2323

2424
if (theme === "dark") {
25+
document.getElementById('theme-toggle').checked = true;
2526
document.documentElement.setAttribute('data-theme', 'dark');
2627
document.documentElement.classList.add('theme--dark');
2728
document.documentElement.classList.remove('theme--light');
2829
document.getElementById("theme-toggle").className = 'light';
2930
} else if (theme === "light") {
31+
document.getElementById('theme-toggle').checked = false;
3032
document.documentElement.setAttribute('data-theme', 'light');
3133
document.documentElement.classList.add('theme--light');
3234
document.documentElement.classList.remove('theme--dark');
3335
document.getElementById("theme-toggle").className = 'dark';
3436
} else if (userPrefers === "dark") {
37+
document.getElementById('theme-toggle').checked = false;
3538
document.documentElement.setAttribute('data-theme', 'dark');
3639
document.documentElement.classList.add('theme--dark');
3740
document.documentElement.classList.remove('theme--light');
3841
window.localStorage.setItem('theme', 'dark');
3942
document.getElementById("theme-toggle").className = 'light';
4043
} else {
44+
document.getElementById('theme-toggle').checked = true;
4145
document.documentElement.setAttribute('data-theme', 'light');
4246
document.documentElement.classList.add('theme--light');
4347
document.documentElement.classList.remove('theme--dark');

_sass/dash/_base.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ a {
111111
text-decoration: none;
112112

113113
&:hover {
114-
color: $color-foreground;
114+
@include themed() {
115+
color: t('foreground-color');
116+
}
115117
text-decoration: underline;
116118
}
117119

@@ -151,7 +153,8 @@ code {
151153
@include relative-font-size(0.9375);
152154
border-radius: 0.3em;
153155
@include themed() {
154-
background-color: t('background-color');
156+
background-color: $color-background-dark;
157+
color: $color-foreground;
155158
}
156159
}
157160

_sass/dash/_colors.scss

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $color-foreground: #DAE4ED;
44
$color-foreground-dark: lighten($color-background-dark, 30%);
55

66
$color-background-light: #DAE4ED;
7-
$color-background-lighter: lighten($color-background-light, 30%);
7+
$color-background-lighter: lighten($color-background-light, 7%);
88
$color-foreground-dark: #1E2227;
99
$color-foreground-darker: #15171A;
1010

@@ -19,24 +19,24 @@ $color-blue: #637AFE;
1919
$color-indigo: #6775C4;
2020
$color-purple: #8E59D7;
2121

22-
.color-pink { color: $color-pink; }
23-
.color-red { color: $color-red; }
24-
.color-orange { color: $color-orange; }
25-
.color-yellow { color: $color-yellow; }
26-
.color-teal { color: $color-teal; }
27-
.color-green { color: $color-green; }
28-
.color-cyan { color: $color-cyan; }
29-
.color-blue { color: $color-blue; }
30-
.color-indigo { color: $color-indigo; }
31-
.color-purple { color: $color-purple; }
22+
.color-pink { color: $color-pink !important; }
23+
.color-red { color: $color-red !important; }
24+
.color-orange { color: $color-orange !important; }
25+
.color-yellow { color: $color-yellow !important; }
26+
.color-teal { color: $color-teal !important; }
27+
.color-green { color: $color-green !important; }
28+
.color-cyan { color: $color-cyan !important; }
29+
.color-blue { color: $color-blue !important; }
30+
.color-indigo { color: $color-indigo !important; }
31+
.color-purple { color: $color-purple !important; }
3232

33-
.color-pink-hover:hover { color: $color-pink; }
34-
.color-red-hover:hover { color: $color-red; }
35-
.color-orange-hover:hover { color: $color-orange; }
36-
.color-yellow-hover:hover { color: $color-yellow; }
37-
.color-teal-hover:hover { color: $color-teal; }
38-
.color-green-hover:hover { color: $color-green; }
39-
.color-cyan-hover:hover { color: $color-cyan; }
40-
.color-blue-hover:hover { color: $color-blue; }
41-
.color-indigo-hover:hover { color: $color-indigo; }
42-
.color-purple-hover:hover { color: $color-purple; }
33+
.color-pink-hover:hover { color: $color-pink !important; }
34+
.color-red-hover:hover { color: $color-red !important; }
35+
.color-orange-hover:hover { color: $color-orange !important; }
36+
.color-yellow-hover:hover { color: $color-yellow !important; }
37+
.color-teal-hover:hover { color: $color-teal !important; }
38+
.color-green-hover:hover { color: $color-green !important; }
39+
.color-cyan-hover:hover { color: $color-cyan !important; }
40+
.color-blue-hover:hover { color: $color-blue !important; }
41+
.color-indigo-hover:hover { color: $color-indigo !important; }
42+
.color-purple-hover:hover { color: $color-purple !important; }

_sass/dash/_layout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
border-radius: 0.3em;
243243
&:hover {
244244
text-decoration: none;
245-
color: lighten($color-green, 20%);
245+
color: lighten($color-green, 20%) !important;
246246
@include themed() {
247247
background-color: lighten(t('background-color'), 5%);
248248
}

_sass/dash/dn-toggle.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
body {
2-
background-color: #1E314F;
3-
font-family: 'Helvetica Rounded', 'Arial Rounded MT Bold','Montserrat', sans-serif;
4-
color: #fff;
5-
}
6-
71
.toggleWrapper {
82
display: inline-block;
93
float: right;

0 commit comments

Comments
 (0)