Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark mode #168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 37 additions & 20 deletions app.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@

* {
box-sizing: border-box;

--background-color: white;
--text-color: #333;
--shadow-color: #ccc;
--table-alternate-color: #f9f9f9;
--background-color-attribution: rgba(255, 255, 255, 0.8);
}

@media (prefers-color-scheme: dark) {
* {
--background-color: #333;
--shadow-color: #222;
--text-color: #cccccc;
--table-alternate-color: #444;
--background-color-attribution: rgba(51, 51, 51, 0.8);
}
}

body {
margin: 0;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
line-height: 1.42;
color: #333;
background-color: #fff;
color: var(--text-color);
background-color: var(--background-color);
overflow-y: scroll;
}

Expand Down Expand Up @@ -68,11 +84,11 @@ h1, h2, h3, h4, h5, h6 {
position: sticky;
top: 0;
z-index: 1;
background: #fff;
background: var(--background-color);
}

.table-striped > tbody > tr:nth-of-type(2n+1) {
background-color: #f9f9f9;
background-color: var(--table-alternate-color);
}

.table td, th {
Expand All @@ -95,7 +111,7 @@ h1, h2, h3, h4, h5, h6 {
bottom: 0;
margin: 0;
padding: 0.5em;
background: rgba(255, 255, 255, 0.8);
background: var(--background-color-attribution);
}

#branchName {
Expand Down Expand Up @@ -142,7 +158,7 @@ h1, h2, h3, h4, h5, h6 {
}

#wizard .pane-wrapper {
box-shadow: 0 0.15em 0.5em #ccc;
box-shadow: 0 0.15em 0.5em var(--shadow-color);
margin: 1em 0 3em 0;
}

Expand Down Expand Up @@ -175,10 +191,11 @@ h1, h2, h3, h4, h5, h6 {

#wizard #type-pane .radiogroup label {
background-color: #ffb400;
color: #333333;
}

#wizard #type-pane .radiogroup input[type="radio"]:checked + label {
box-shadow: 0 0 0.5em #cf7400 inset;
box-shadow: 0 0 0.5em var(--shadow-color) inset;
}

#wizard #branch-pane {
Expand All @@ -199,11 +216,11 @@ h1, h2, h3, h4, h5, h6 {
}

#wizard #branch-pane.show-experimental-warning button.dl-experimental {
box-shadow: 0 0 0.5em #005ea0 inset;
box-shadow: 0 0 0.5em var(--shadow-color) inset;
}

#wizard #type-pane.show-deviceinfo-warning button.deviceinfo {
box-shadow: 0 0 0.5em #005ea0 inset;
box-shadow: 0 0 0.5em var(--shadow-color) inset;
}

#wizard #branch-pane .warning-experimental,
Expand All @@ -212,7 +229,7 @@ h1, h2, h3, h4, h5, h6 {
display: none;
margin: 1em 0;
padding: 1em;
box-shadow: 0.125em 0.125em 0.5em #ccc;
box-shadow: 0.125em 0.125em 0.5em var(--shadow-color);
border: .5em solid #009ee0;
}

Expand All @@ -230,18 +247,18 @@ h1, h2, h3, h4, h5, h6 {
font: inherit;
color: inherit;
margin-bottom: .5em;
background: #fff;
background: var(--background-color);
border: none;
border: 1px solid #ddd;
box-shadow: 1px 2px 2px 0 #ccc;
box-shadow: 1px 2px 2px 0 var(--shadow-color);
padding: 0.75em 0.75em;
margin-right: 0.5em;
margin-bottom: 1em;
transition: box-shadow 200ms ease-in-out;
}

#wizard select:focus, #wizard input:focus {
box-shadow: 1px 2px 2px 0 #ccc, 2px 2px 6px #ccc;
box-shadow: 1px 2px 2px 0 var(--shadow-color), 2px 2px 6px var(--shadow-color);
}

#wizard option {
Expand All @@ -262,17 +279,17 @@ h1, h2, h3, h4, h5, h6 {
display: inline-block;
list-style-type: none;
font: inherit;
color: black;
color: var(--text-color);
margin: .5em;
padding: .5em 1em;
border: none;
box-shadow: 0.125em 0.125em 0.5em #ccc;
box-shadow: 0.125em 0.125em 0.5em var(--shadow-color);
font-weight: normal;
cursor: pointer;
}

#wizard .btn:hover {
color: black;
color: var(--text-color);
}

#wizard .imagePreview {
Expand Down Expand Up @@ -309,19 +326,19 @@ h1, h2, h3, h4, h5, h6 {
min-height: 11em;
margin: 0.5em;
padding: 0.5em;
border: 1px solid white;
border: 1px solid var(--background-color);
text-align: center;
}

#wizard .imagePreview .preview:hover {
border: 1px solid #ccc;
border: 1px solid var(--shadow-color);
cursor: pointer;
}

#wizard .imagePreview .preview.selected {
border: 1px solid #ccc;
border: 1px solid var(--shadow-color);
cursor: default;
box-shadow: 0 0 0.5em #ccc inset;
box-shadow: 0 0 0.5em var(--shadow-color) inset;
}

#wizard .imagePreview .preview img {
Expand Down