Skip to content

Commit 7168298

Browse files
authored
Night mode fixes (#1163)
* night mode fix for candidate packages * night mode fix for reverse dependencies modal * indentation * untested, fix quickjump night mode * fix background color for mobile devices closes: #1167
1 parent 08d61eb commit 7168298

File tree

2 files changed

+58
-13
lines changed

2 files changed

+58
-13
lines changed

datafiles/static/hackage.css

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,23 @@
44

55
/* Is this portable? */
66
html {
7-
background-color: white;
87
width: 100%;
98
height: 100%;
109
}
1110

1211
@media (prefers-color-scheme: dark) {
12+
html {
13+
background-color: #333;
14+
}
1315
body {
1416
background: #333;
1517
color: #fefefe;
1618
}
1719
}
1820
@media (prefers-color-scheme: light) {
21+
html {
22+
background-color: #fefefe;
23+
}
1924
body {
2025
background: #fefefe;
2126
color: #333;
@@ -140,22 +145,38 @@ pre, code, kbd, samp, .src {
140145
font-size: 85%; /* 11pt */
141146
}
142147

143-
.candidate-warn {
144-
background-color: #ffdddd;
148+
@media (prefers-color-scheme: dark) {
149+
.candidate-warn {
145150
border-left: 6px solid #f44336;
146151
padding: 0.01em 16px;
147152
margin-bottom: 8px !important;
148153
margin-top: 8px !important;
154+
}
155+
156+
.candidate-info {
157+
border-left: 6px solid #2196F3;
158+
padding: 0.01em 16px;
159+
margin-bottom: 8px;
160+
}
149161
}
150162

151-
.candidate-info {
163+
@media (prefers-color-scheme: light) {
164+
.candidate-warn {
165+
background-color: #ffdddd;
166+
border-left: 6px solid #f44336;
167+
padding: 0.01em 16px;
168+
margin-bottom: 8px !important;
169+
margin-top: 8px !important;
170+
}
171+
172+
.candidate-info {
152173
background-color: #e7f3fe;
153174
border-left: 6px solid #2196F3;
154175
padding: 0.01em 16px;
155176
margin-bottom: 8px;
177+
}
156178
}
157179

158-
159180
/* @end */
160181

161182
/* @group Common */
@@ -529,7 +550,6 @@ table.properties td, table.properties th {
529550
padding-bottom: 3em;
530551
}
531552

532-
533553
#page-header {
534554
background: #5E5184;
535555
border-bottom: 5px solid rgba(69, 59, 97, 0.5);
@@ -1014,12 +1034,21 @@ p.tip {
10141034

10151035
/* Misc admin forms */
10161036

1017-
.box {
1018-
background: #faf9dc;
1019-
border: 1px solid #d8d7ad;
1020-
padding: 0.5em 1em;
1021-
max-width: 35em;
1022-
margin: 0.5em 0 1em 1em;
1037+
@media (prefers-color-scheme: dark) {
1038+
.box {
1039+
padding: 0.5em 1em;
1040+
max-width: 35em;
1041+
margin: 0.5em 0 1em 1em;
1042+
}
1043+
}
1044+
@media (prefers-color-scheme: light) {
1045+
.box {
1046+
background: #faf9dc;
1047+
border: 1px solid #d8d7ad;
1048+
padding: 0.5em 1em;
1049+
max-width: 35em;
1050+
margin: 0.5em 0 1em 1em;
1051+
}
10231052
}
10241053

10251054
table.simpletable th, table.simpletable td {
@@ -1210,3 +1239,20 @@ a.deprecated[href]:visited {
12101239
.paginator .current:hover {
12111240
border: 1px solid #979797;
12121241
}
1242+
1243+
@media (prefers-color-scheme: dark) {
1244+
div#modal #content {
1245+
background: #222;
1246+
}
1247+
}
1248+
@media (prefers-color-scheme: light) {
1249+
div#modal #content {
1250+
background: #fff;
1251+
}
1252+
}
1253+
1254+
@media (prefers-color-scheme: dark) {
1255+
#search-results {
1256+
background: #222;
1257+
}
1258+
}

datafiles/templates/packagePageAssets.st

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
div#modal #content {
2222
border-radius: 8px;
23-
background: #fff;
2423
padding: 20px;
2524
}
2625

0 commit comments

Comments
 (0)