Skip to content

Commit

Permalink
add support for dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
friedPotat0 committed Apr 5, 2021
1 parent 337410c commit 7adf103
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 7 deletions.
19 changes: 19 additions & 0 deletions options.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,22 @@
.input-line img {
margin-right: 5px;
}

/* COLOR SETTINGS FOR DARK/LIGHT THEME */
@media (prefers-color-scheme: light) {
body {
color: black;
background: white;
}
input {
background-color: #333;
color: white;
}
}

@media (prefers-color-scheme: dark) {
body {
color: white;
background: #202023;
}
}
39 changes: 32 additions & 7 deletions popup.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
body {
padding: 20px;
color: black;
}
h5 {
margin: 0;
Expand Down Expand Up @@ -33,7 +32,6 @@ table.score-details tr th:nth-child(2) {
}
table.score-details tr.score td span.info {
font-size: 75%;
color: #7a7a7a;
word-break: break-all;
}
table.score-details tr.score td:nth-child(2) span {
Expand All @@ -52,9 +50,36 @@ table.score-details tr.score.positive td:nth-child(2) span {
table.score-details tr.score.neutral td:nth-child(2) span {
background-color: #b4b4b4;
}
table.score-details tbody tr:nth-child(even) {
background: #eee;
}
table.score-details tbody tr:nth-child(odd) {
background: #fff;

/* COLOR SETTINGS FOR DARK/LIGHT THEME */
@media (prefers-color-scheme: light) {
body {
color: black;
background: white;
}
table.score-details tbody tr:nth-child(even) {
background: #eee;
}
table.score-details tbody tr:nth-child(odd) {
background: #fff;
}
table.score-details tr.score td span.info {
color: #7a7a7a;
}
}

@media (prefers-color-scheme: dark) {
body {
color: white;
background: #333;
}
table.score-details tbody tr:nth-child(even) {
background: #424242;
}
table.score-details tbody tr:nth-child(odd) {
background: #333;
}
table.score-details tr.score td span.info {
color: #949494;
}
}

0 comments on commit 7adf103

Please sign in to comment.