Skip to content

Commit 03dca4c

Browse files
authored
Add dark mode (#39)
1 parent 2ee028e commit 03dca4c

File tree

1 file changed

+46
-9
lines changed

1 file changed

+46
-9
lines changed

src/popup.css

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ body.options-page {
1010
}
1111
a {
1212
outline: 0;
13+
color: inherit;
1314
}
1415
input {
1516
box-sizing: border-box;
@@ -29,6 +30,8 @@ input {
2930
* HEADER
3031
*/
3132
input {
33+
background-color: transparent;
34+
border: solid 1px;
3235
padding: 0.2em 0.4em;
3336
}
3437
.options {
@@ -55,15 +58,10 @@ button {
5558
}
5659
.options * {
5760
text-decoration: none;
58-
color: inherit;
5961
padding: 0.5em;
6062
text-transform: uppercase;
6163
border-radius: 2px;
6264
}
63-
.options *:hover {
64-
color: black;
65-
background-color: #d9d9d9;
66-
}
6765

6866
/**
6967
* LIST
@@ -79,7 +77,7 @@ button {
7977
font-size: 1.2em;
8078
line-height: 1.9;
8179
font-weight: bolder;
82-
border-bottom: 1px solid #eee;
80+
border-bottom: 1px solid #88888833;
8381
padding-right: var(--margin);
8482
}
8583

@@ -88,8 +86,8 @@ button {
8886
}
8987
.ext.disabled .extName {
9088
font-weight: normal;
91-
color: gray;
9289
filter: grayscale(60%);
90+
opacity: 0.5;
9391
}
9492
.ext.disabled .extOptions {
9593
display: none;
@@ -125,8 +123,8 @@ button {
125123
.ext:hover > * {
126124
opacity: 1;
127125
}
128-
.ext a:hover,
129-
.ext button:hover {
126+
a:hover,
127+
button:hover {
130128
background-color: #ecf0f1;
131129
cursor: pointer;
132130
}
@@ -151,4 +149,43 @@ button {
151149
}
152150
.extUninstall:before {
153151
content: url(icons/bin.svg);
152+
}
153+
154+
@media (prefers-color-scheme: dark) {
155+
/* Border around improves contrast */
156+
body:before {
157+
content: "";
158+
position: fixed;
159+
top: 0;
160+
bottom: 0;
161+
right: 0;
162+
left: 0;
163+
z-index: -1;
164+
border: solid 1px #595a5e;
165+
}
166+
body {
167+
background-color: #292a2d;
168+
color: #e8eaed;
169+
}
170+
input {
171+
color: inherit;
172+
background-color: transparent;
173+
border: solid 1px;
174+
padding: 0.2em 0.4em;
175+
}
176+
177+
a:hover,
178+
button:hover {
179+
background-color: #c4d7dc38;
180+
}
181+
.ext :before {
182+
filter: brightness(1.6);
183+
}
184+
.ext.type-development {
185+
color: #83acf5;
186+
}
187+
188+
.ext.type-admin {
189+
color: #ffa38d;
190+
}
154191
}

0 commit comments

Comments
 (0)