metamorpov/src/popup.css

428 lines
8.4 KiB
CSS

/*TODO text color dropdowns, button icons and text*/
:root {
--font-features: "calt" 1, "case" 0, "ccmp" 1, "ss03" 1, "cv01" 1, "cv05" 1, "cv06" 1, "cv08" 0, "cv11" 1, "cv12" 0, "cv13" 0;
--large-text: 16px;
--small-text: 14px;
/* Grayscale */
--color-l-gray-10: hsla(36, 38%, 98%, 1);
--color-l-gray-20: hsla(35, 36%, 96%, 1);
--color-l-gray-30: hsla(35, 37%, 92%, 1);
--color-l-gray-40: hsla(34, 34%, 90%, 1);
--color-l-gray-50: hsla(36, 35%, 88%, 1);
--color-l-gray-60: hsla(37, 38%, 83%, 1);
--color-l-gray-70: hsla(34, 37%, 70%, 1);
--color-l-gray-80: hsla(34, 29%, 60%, 1);
--color-l-gray-90: hsla(31, 23%, 50%, 1);
--color-l-gray-100: hsla(35, 28%, 40%, 1);
--color-l-gray-110: hsla(34, 30%, 37%, 1);
--color-l-gray-120: hsla(36, 32%, 30%, 1);
--color-l-gray-130: hsla(31, 45%, 24%, 1);
--color-l-gray-140: hsla(33, 54%, 17%, 1);
--color-l-alpha-gray: hsla(34, 37%, 70%, 0.15);
--text-color: var(--color-l-gray-120);
--desc-color: var(--color-l-gray-100);
--placeholder-color: var(--color-l-gray-70);
--link-color: var(--color-l-gray-90);
--icon-color: var(--color-l-gray-80);
--icon-color-hover: var(--color-l-gray-90);
--border-color: var(--color-l-gray-50);
--border-color-hover: var(--color-l-gray-60);
--scrollbar-color: var(--color-l-gray-70);
--button-inset-shadow-size: 2px;
--shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.2),
inset 0px 0px 0px 1px rgba(0, 0, 0, 0.1),
inset 0px calc(-1 * var(--button-inset-shadow-size)) 0px 2px rgba(0, 0, 0, 0.09),
inset 0px -2px 4px 0px rgba(0, 0, 0, 0.1),
0px 4px 4px -5.6px rgba(0, 0, 0, 0.4),
0px 2px 4px -2.7px rgba(0, 0, 0, 0.1),
0px 2px 4px -1px rgba(0, 0, 0, 0.05);
--shadow-hover: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.4),
inset 0px 0px 0px 1px rgba(0, 0, 0, 0.15),
inset 0px calc(-1 * var(--button-inset-shadow-size)) 0px 2px rgba(0, 0, 0, 0.09),
inset 0px -2px 4px 0px rgba(0, 0, 0, 0.1),
0px 4px 4px -5.6px rgba(0, 0, 0, 0.4),
0px 2px 4px -2.7px rgba(0, 0, 0, 0.15),
0px 2px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-active: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.15),
inset 0px 0px 0px calc(1px + var(--button-inset-shadow-size)) rgba(0, 0, 0, 0.09),
inset 0px 2px 8px 0px rgba(0, 0, 0, 0.2),
0px 0px 0px 1px rgba(255, 255, 255, 0.6);
--shadow-focus: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.2),
inset 0px 0px 0px 1px rgba(0, 0, 0, 0.1),
inset 0px calc(-1 * var(--button-inset-shadow-size)) 0px 2px rgba(0, 0, 0, 0.09),
inset 0px -2px 4px 0px rgba(0, 0, 0, 0.1),
0px 4px 4px -5.6px rgba(0, 0, 0, 0.4),
0px 2px 4px -2.7px rgba(0, 0, 0, 0.1),
0px 2px 4px -1px rgba(0, 0, 0, 0.05),
0px 0px 0px 3px var(--color-l-alpha-gray);
--text-input-shadow-active: inset 0px 1px 0px 0px rgba(255, 255, 255, 1), inset 0px -1px 0px 0px rgba(0, 0, 0, 0.04), 0px 1px 6px 0px rgba(0, 0, 0, 0.07);
}
input, select {
background-color: var(--color-l-gray-20);
border: 1px solid var(--border-color);
border-radius: .5em;
font-size: var(--large-text);
color: var(--text-color);
padding: 2px 8px 2px 8px;
gap: 8px;
}
input {
box-sizing: border-box;
width: 100%;
}
input::placeholder {
color: var(--placeholder-color);
}
input:hover {
border: 1px solid var(--border-color-hover);
transition: 0.3s;
}
input:focus {
transition: 0.1s;
border: 1px solid var(--border-color-hover);
background-color: var(--color-l-gray-10);
box-shadow: var(--text-input-shadow-active);
outline: none;
}
select {
padding: 6px;
box-shadow: var(--shadow);
}
select:active {
transition: 0.1s;
box-shadow: var(--shadow-active);
}
select:focus {
box-shadow: var(--shadow-focus);
}
label {
font-size: var(--large-text);
}
.primary-prompt {
display: flex;
align-items: center;
text-wrap: nowrap;
gap: 6px;
margin-top: 20px;
}
.primary-promt input {
font-size: 50px;
}
#other {
display: none; /* Modified by options.js */
gap: 6px;
margin-top: 12px;
margin-left: 18px;
}
#other li {
display: grid;
grid-template-columns: 1fr 2fr;
align-items: center;
gap: 6px;
}
#other > li > label {
font-size: var(--small-text);
text-align: right;
text-wrap: nowrap;
}
#other > li > input {
font-size: var(--small-text);
}
#other > li > select {
font-size: var(--small-text);
width: min-content;
}
#also > li {
display: flex;
align-items: center;
gap: 6px;
margin-top: 6px;
}
.lhs {
text-align: right;
}
#also > li > button {
background-color: transparent;
width: fit-content;
margin: 0;
padding: 0;
}
.hide-button > button {
visibility: hidden;
}
body {
background-color: var(--color-l-gray-30);
color: var(--text-color);
width: 350px; /* Same as width of add-on viewer on my system */
height: 500px; /* Max height allowed TODO verify on wi-fi */
padding-left: 10px;
padding-right: 15px;
font-family: 'Inter', sans-serif;
font-feature-settings: var(--font-features);
font-size: var(--small-text);
margin: auto;
}
html {
scrollbar-color: var(--scrollbar-color) transparent;
}
ul {
list-style: none;
padding-left: 0;
}
/* Button grid */
#button-grid {
display: grid;
grid-template-columns: 7fr 5fr;
gap: 8px;
margin-top: 20px;
margin-bottom: 20px;
}
#button-grid > button {
display: flex;
justify-content: center;
align-items: center;
font-weight: 600;
border: 1px solid var(--border-color);
border-radius: .5em;
width: 100%;
font-size: var(--large-text);
padding: 6px;
margin-top: 6px;
margin-bottom: 6px;
gap: 8px;
text-align: center;
cursor: pointer;
box-shadow: var(--shadow);
}
#button-grid > button > svg {
width: 24px;
height: 24px;
transform: translateY(-10%);
}
#button-grid > button > p {
margin: 0;
font-family: 'Inter', sans-serif;
font-feature-settings: var(--font-features);
transform: translateY(-10%);
}
#button-grid > button:hover {
transition-duration: 0.3s;
box-shadow: var(--shadow-hover);
}
#button-grid > button:active {
transition: 0.3s;
box-shadow: var(--shadow-active);
}
#button-grid > button:active > p {
transition: 0.3s;
transform: translateY(0%);
}
#button-grid > button:active > svg {
transition: 0.3s;
transform: translateY(0%);
}
/* Save button */
#save {
background-color: var(--color-l-gray-90);
color: var(--color-l-gray-10);
}
#save:hover {
background-color: var(--color-l-gray-80);
}
#save:active {
background-color: var(--color-l-gray-90);
}
/* Restore button */
#restore {
background-color: var(--color-l-gray-20);
color: var(--text-color);
}
#restore:hover {
background-color: var(--color-l-gray-10);
}
#restore:active {
background-color: var(--color-l-gray-20);
}
.visually-hidden {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
/* Site enabled section */
#site-enabled {
display: none; /* TODO Actually do this section! */
grid-template-columns: 2fr 1fr;
background-color: var(--color-l-gray-10);
padding: 10px;
border: 0;
border-radius: .5em;
}
#hostname {
font-size: var(--large-text);
font-weight: 400;
text-align: center;
}
#site-enabled svg {
width: 50%;
justify-self: center;
align-self: center;
cursor: pointer;
}
/* Configuration section */
#configuration {
background-color: var(--color-l-gray-10);
padding: 10px;
border: 0;
border-radius: .5em;
margin-top: var(--small-text);
}
label {
font-size: var(--large-text);
}
.primary-promt input {
font-size: 50px;
}
#other {
display: none; /* Modified by options.js */
gap: 6px;
margin-top: 12px;
margin-left: 18px;
}
#other li {
display: grid;
grid-template-columns: 1fr 2fr;
align-items: center;
gap: 6px;
}
#other > li > label {
font-size: var(--small-text);
text-align: right;
text-wrap: nowrap;
}
#other > li > input {
font-size: var(--small-text);
}
#other > li > select {
font-size: var(--small-text);
width: min-content;
}
#also > li {
display: flex;
align-items: center;
gap: 6px;
margin-top: 6px;
}
.lhs {
text-align: right;
}
#also > li > button {
color: var(--icon-color);
background-color: transparent;
width: 24px;
height: 24px;
margin: 0;
padding: 0;
border: 0;
box-shadow: 0;
}
#also > li > button:hover {
color: var(--icon-color-hover);
}
.hide-button > button {
visibility: hidden;
}
/* Links section */
#links {
text-align: right;
}
#links > li {
margin-top: 6px;
}
a {
color: var(--link-color);
text-decoration: underline;
text-underline-offset: 2px;
transition-duration: 0.3s;
}
a:hover{
color: var(--text-color);
}