Refactor static.css with color variables

This commit is contained in:
Alex Gleason 2020-07-27 17:27:17 -05:00
parent 2208e5d9ba
commit 0f94221594
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

View File

@ -2,17 +2,25 @@
box-sizing: border-box; box-sizing: border-box;
} }
:root {
--brand-color: #d8a070;
--background-color: #121a24;
--foreground-color: #182230;
--primary-text-color: #b9b9ba;
--muted-text-color: #89898a;
}
body { body {
background-color: #121a24; background-color: var(--background-color);
font-family: sans-serif; font-family: sans-serif;
color: #b9b9ba; color: var(--primary-text-color);
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.instance-header { .instance-header {
padding: 10px; padding: 10px;
background: #182230; background: var(--foreground-color);
box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.5); box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.5);
} }
@ -37,7 +45,7 @@ body {
.container { .container {
max-width: 400px; max-width: 400px;
padding: 20px; padding: 20px;
background-color: #182230; background-color: var(--foreground-color);
border-radius: 4px; border-radius: 4px;
margin: auto; margin: auto;
margin-top: 35px; margin-top: 35px;
@ -51,14 +59,14 @@ h1 {
} }
h2 { h2 {
color: #b9b9ba; color: var(--primary-text-color);
font-weight: normal; font-weight: normal;
font-size: 18px; font-size: 18px;
margin-bottom: 20px; margin-bottom: 20px;
} }
a { a {
color: color: #d8a070; color: var(--brand-color);
text-decoration: none; text-decoration: none;
} }
@ -67,7 +75,7 @@ form {
} }
.input { .input {
color: #89898a; color: var(--muted-text-color);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
@ -77,8 +85,8 @@ input {
padding: 10px; padding: 10px;
margin-top: 5px; margin-top: 5px;
margin-bottom: 10px; margin-bottom: 10px;
background-color: #121a24; background-color: var(--background-color);
color: #b9b9ba; color: var(--primary-text-color);
border: 0; border: 0;
transition-property: border-bottom; transition-property: border-bottom;
transition-duration: 0.35s; transition-duration: 0.35s;
@ -90,7 +98,7 @@ input {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 1em 0; margin: 1em 0;
color: #89898a; color: var(--muted-text-color);
} }
.scopes-input label:first-child { .scopes-input label:first-child {
@ -100,7 +108,7 @@ input {
.scopes { .scopes {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
color: #b9b9ba; color: var(--primary-text-color);
} }
.scope { .scope {
@ -111,7 +119,7 @@ input {
} }
.scope:before { .scope:before {
color: #b9b9ba; color: var(--primary-text-color);
content: "✔\fe0e"; content: "✔\fe0e";
margin-left: 1em; margin-left: 1em;
margin-right: 1em; margin-right: 1em;
@ -131,33 +139,33 @@ input {
cursor: pointer; cursor: pointer;
display: inline-block; display: inline-block;
color: white; color: white;
background-color: #121a24; background-color: var(--background-color);
border: 4px solid #121a24; border: 4px solid var(--background-color);
box-shadow: 0px 0px 1px 0 #d8a070; box-shadow: 0px 0px 1px 0 var(--brand-color);
width: 1.2em; width: 1.2em;
height: 1.2em; height: 1.2em;
margin-right: 1.0em; margin-right: 1.0em;
content: ""; content: "";
transition-property: background-color; transition-property: background-color;
transition-duration: 0.35s; transition-duration: 0.35s;
color: #121a24; color: var(--background-color);
margin-bottom: -0.2em; margin-bottom: -0.2em;
border-radius: 2px; border-radius: 2px;
} }
[type="checkbox"]:checked + label:before { [type="checkbox"]:checked + label:before {
background-color: #d8a070; background-color: var(--brand-color);
} }
input:focus { input:focus {
outline: none; outline: none;
border-bottom: 2px solid #d8a070; border-bottom: 2px solid var(--brand-color);
} }
button { button {
width: 100%; width: 100%;
background-color: #1c2a3a; background-color: #1c2a3a;
color: #b9b9ba; color: var(--primary-text-color);
border-radius: 4px; border-radius: 4px;
border: none; border: none;
padding: 10px; padding: 10px;
@ -172,7 +180,7 @@ button {
button:hover { button:hover {
cursor: pointer; cursor: pointer;
box-shadow: 0px 0px 0px 1px #d8a070, box-shadow: 0px 0px 0px 1px var(--brand-color),
0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset,
0px -1px 0px 0px rgba(0, 0, 0, 0.2) inset; 0px -1px 0px 0px rgba(0, 0, 0, 0.2) inset;
} }