Skip to content

Commit 1e1df3c

Browse files
authored
Dark mode (#23)
1 parent c404a7c commit 1e1df3c

File tree

12 files changed

+254
-109
lines changed

12 files changed

+254
-109
lines changed

docs/global.css

Lines changed: 50 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,61 @@
11
html, body {
2-
position: relative;
3-
width: 100%;
4-
height: 100%;
2+
position: relative;
3+
width: 100%;
4+
height: 100%;
55
}
66

7-
body {
8-
color: #333;
9-
margin: 0;
10-
padding: 8px;
11-
box-sizing: border-box;
12-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
13-
}
14-
15-
a {
16-
color: rgb(0,100,200);
17-
text-decoration: none;
18-
}
19-
20-
a:hover {
21-
text-decoration: underline;
22-
}
23-
24-
a:visited {
25-
color: rgb(0,80,160);
26-
}
27-
28-
label {
29-
display: block;
30-
}
31-
32-
input, button, select, textarea {
33-
font-family: inherit;
34-
font-size: inherit;
35-
-webkit-padding: 0.4em 0;
36-
padding: 0.4em;
37-
margin: 0 0 0.5em 0;
38-
box-sizing: border-box;
39-
border: 1px solid #ccc;
40-
border-radius: 2px;
41-
}
42-
43-
input:disabled {
44-
color: #ccc;
7+
body, div {
8+
transition: background-color 0.5s;
459
}
4610

4711
button {
48-
color: #333;
49-
background-color: #f4f4f4;
50-
outline: none;
12+
outline: none;
5113
}
5214

53-
button:disabled {
54-
color: #999;
55-
}
56-
57-
button:not(:disabled):active {
58-
background-color: #ddd;
15+
body {
16+
margin: 0;
17+
padding: 8px;
18+
box-sizing: border-box;
5919
}
6020

61-
button:focus {
62-
border-color: #666;
21+
input, button, select, textarea {
22+
font-family: inherit;
23+
font-size: inherit;
24+
-webkit-padding: 0.4em 0;
25+
padding: 0.4em;
26+
margin: 0 0 0.5em 0;
27+
box-sizing: border-box;
28+
border: 1px solid;
29+
border-radius: 2px;
30+
}
31+
32+
.highcharts-background {
33+
transition: all 0.5s;
34+
}
35+
36+
#container {
37+
width:70%;
38+
min-width: 310px;
39+
}
40+
41+
.highcharts-dark {
42+
/* UI colors */
43+
--highcharts-background-color: #212529;
44+
45+
/* Neutral color variations */
46+
--highcharts-neutral-color-100: rgb(255, 255, 255);
47+
--highcharts-neutral-color-80: rgb(214, 214, 214);
48+
--highcharts-neutral-color-60: rgb(173, 173, 173);
49+
--highcharts-neutral-color-40: rgb(133, 133, 133);
50+
--highcharts-neutral-color-20: rgb(92, 92, 92);
51+
--highcharts-neutral-color-10: rgb(71, 71, 71);
52+
--highcharts-neutral-color-5: rgb(61, 61, 61);
53+
--highcharts-neutral-color-3: rgb(57, 57, 57);
54+
55+
/* Highlight color variations */
56+
--highcharts-highlight-color-100: rgb(122, 167, 255);
57+
--highcharts-highlight-color-80: rgb(108, 144, 214);
58+
--highcharts-highlight-color-60: rgb(94, 121, 173);
59+
--highcharts-highlight-color-20: rgb(65, 74, 92);
60+
--highcharts-highlight-color-10: rgb(58, 63, 71);
6361
}

docs/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
<head>
44
<meta charset='utf-8'>
55
<meta name='viewport' content='width=device-width,initial-scale=1'>
6-
76
<link rel='icon' type='image/png' href='./favicon.png'>
8-
<link rel='stylesheet' href='./global.css'>
9-
<link rel='stylesheet' href='./build/bundle.css'>
10-
117
<script defer src='./build/bundle.js'></script>
128
</head>
139

package-lock.json

Lines changed: 24 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,20 @@
1111
"devDependencies": {
1212
"@rollup/plugin-commonjs": "^25.0.7",
1313
"@rollup/plugin-node-resolve": "^15.2.3",
14+
"esm-env": "^1.0.0",
15+
"highcharts": "^11.4.3",
1416
"rollup": "^2.3.4",
1517
"rollup-plugin-css-only": "^4.5.2",
1618
"rollup-plugin-livereload": "^2.0.5",
1719
"rollup-plugin-svelte": "^7.2.0",
1820
"rollup-plugin-terser": "^7.0.0",
1921
"svelte": "^4.2.17",
20-
"svelte-spa-router": "^4.0.1",
21-
"highcharts": "^11.4.3",
2222
"svelte-check": "^3.8.0",
23-
"svelte-preprocess": "^5.1.4"
23+
"svelte-preprocess": "^5.1.4",
24+
"svelte-spa-router": "^4.0.1"
2425
},
2526
"dependencies": {
26-
"sirv-cli": "^2.0.2"
27+
"sirv-cli": "^2.0.2",
28+
"svelte-persisted-store": "^0.11.0"
2729
}
2830
}

0 commit comments

Comments
 (0)