stylus/install-usercss/install-usercss.css
narcolepticinsomniac b2af8770ee
usercss
2018-10-12 16:25:29 -04:00

581 lines
12 KiB
CSS

:root{
--install-btn-default: hsl(176, 50%, 35%);
--install-btn-default-hover: hsl(176, 50%, 40%);
--install-btn-update: hsl(140, 100%, 13%);
--install-btn-update-hover: hsl(140, 100%, 18%);
--warning-border: hsl(0, 28%, 60%);
--warnings-bg: hsl(0, 100%, 94%);
}
body {
overflow: hidden;
margin: 0;
font: 12px arial, sans-serif;
background: var(--main-bg);
}
img.icon,
.svg-icon {
height: 1.4em;
vertical-align: middle;
}
.svg-icon {
margin-left: 2px;
fill: var(--black);
transition: fill .5s;
}
a:hover .svg-icon {
fill: var(--gray-lightness-40);
}
input:disabled + span {
color: var(--truegray);
}
.container {
display: flex;
height: 100vh;
}
#header,
.warnings {
flex: 0 0 280px;
box-sizing: border-box;
padding: 1rem;
border-right: 1px dashed var(--gray-lightness-66);
box-shadow: 0 0 50px -18px var(--black);
overflow-wrap: break-word;
overflow-y: auto;
z-index: 100;
}
#header.meta-init-error {
display: none;
}
.warnings {
display: none;
padding-bottom: 0;
flex-basis: auto;
background: var(--warnings-bg);
border-right: none;
border-bottom: 1px dashed var(--gray-lightness-66);
}
.has-warnings .warnings {
display: flex;
}
.warning {
font-weight: bold;
font-size: 125%;
margin-bottom: 1em;
}
.warning pre {
overflow-wrap: break-word;
white-space: pre-wrap;
margin: 1ex 0 0;
font-family: monospace;
font-weight: normal;
font-size: 80%;
}
h1 {
margin-top: 0;
}
h1 small {
font-size: 0.6em;
}
.meta-version::before {
content: " v";
}
.actions {
margin-bottom: 1em;
}
.actions label {
max-width: -moz-fit-content;
max-width: fit-content;
display: flex;
align-items: center;
margin: 0.5em 0;
}
.install {
font-family: Arial, "DejaVu Sans", Verdana, Geneva, sans-serif;
font-size: 14px;
background-color: var(--gray-lightness-33);
color: var(--gray-lightness-93);
border-radius: 4px;
padding: 4px 38px 4px 10px;
position: relative;
display: inline-block;
text-shadow: 1px 1px 1px var(--gray-lightness-20);
-webkit-appearance: none;
-moz-appearance: none;
border-style: none;
margin-bottom: 1ex;
cursor: pointer;
box-shadow: inset 0 -1px 0 0 var(--gray-lightness-24), inset 0 1px 0 0 var(--gray-lightness-30), inset 1px 0 0 0 var(--gray-lightness-24);
transition: color .25s, background-color .25s;
}
.install,
.install:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAeCAYAAAAGos/EAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gINFiccyZ2qfAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAb0lEQVQY012OwQ3CUAzFnNeMAfsv1hk4VDTm0H6ByMmyLL2U+lRowKobwAVFEEWbwqKIIGDXBTQqBU3VbWYk0CTLIAxNEHI1s5oAYXAYm2AIfZ64Ab1ta4s/yHv908twHB5gqf0Tvyg1l9l3efC9Dw0XRC2vHIXXAAAAAElFTkSuQmCC);
background-size: 100% 100%;
background-repeat: repeat-x;
}
.install:hover:not(:disabled) {
background-color: var(--gray-lightness-38);
color: var(--white);
text-shadow: none;
}
.install:before,
.install:after {
content: "";
vertical-align: middle;
box-sizing: border-box;
border-radius: 0 4px 4px 0;
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 30px;
}
.install:before {
border-left: 1px solid var(--black-alpha-3);
box-shadow: inset 0 -1px 0 0 var(--gray-lightness-24), inset 0 1px 0 0 var(--gray-lightness-30), inset -1px 0 0 0 var(--gray-lightness-38);
padding: 5px 8px;
transition: background-color .25s;
}
.install:before,
.install:active:before,
.install:active:hover:before {
background-color: var(--install-btn-default);
}
.install:hover:before {
background-color: var(--install-btn-default-hover);
}
.install:active,
.install:active:before {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAeCAYAAAAGos/EAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gINFioX6+ENuQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAc0lEQVQY003OwQ0CQQxD0edsRBX03xg9cFjBhMPuSOT0ZdmxuS/zesWTzExBI7xlZhrKeeYkmZkH1Icg3Rfs1D98v3Kgj+NSypJlpZWU0tbKKlpVCm0JSyuxPbbnqpiJ0JLr8+w9sbtGxqRFInvYbLiVGX46ECZMv8VvjwAAAABJRU5ErkJggg==);
background-size: 100% 100%;
background-repeat: repeat-x;
}
.install:active,
.install:active:hover {
background-color: var(--gray-lightness-33);
}
.install:after {
background-image: url(../images/icon/16.png);
background-repeat: no-repeat;
background-position: center center;
}
.install:disabled {
opacity: .25;
color: var(--white);
cursor: auto;
}
.install.reinstall:after {
filter: grayscale(100%);
}
.install.reinstall:before,
.install.reinstall:active:before,
.install.reinstall:active:hover:before {
background-color: var(--gray-lightness-20);
}
.install.reinstall:hover:before {
background-color: var(--gray-lightness-25);
}
.install.reinstall:hover:before {
background-color: var(--gray-lightness-27);
}
.install.update:before,
.install.update:active:before,
.install.update:active:hover:before {
background-color: var(--install-btn-update);
}
.install.update:hover:before {
background-color: var(--install-btn-update-hover);
}
.install.update:after {
filter: hue-rotate(-18deg) brightness(.7) contrast(2);
}
.install.installed,
h2.installed {
display: none;
}
h2.installed.active {
display: inline-block;
font-weight: bold;
margin-bottom: 1ex;
margin-top: 0;
}
.actions label input {
margin: 0 0.5em 0 0;
flex: 0 0 auto;
}
.actions label span {
min-width: 0;
}
.set-update-url {
flex-wrap: wrap;
}
.set-update-url p {
word-break: break-all;
opacity: .5;
width: 100%;
margin: .25em 0 .25em;
}
.external {
text-align: center;
}
.external > * {
margin: 0 7.5px;
}
li {
margin-left: -2em;
}
.main {
overflow: hidden;
}
.main,
.main .CodeMirror {
height: 100% !important;
width: 100% !important;
border: none;
}
/************ CM default ************/
.CodeMirror.cm-s-default {
background: var(--gray-lightness-93) !important;
}
.CodeMirror.cm-s-default .CodeMirror-gutters {
background-color: var(--truegray-alpha-1) !important;
border-right: 1px solid var(--truegray-alpha-2) !important;
}
.CodeMirror {
outline: none !important;
}
/* spinner-related */
#header {
position: relative;
}
#header:not(.meta-init) > *:not(.lds-spinner),
#header.meta-init > .lds-spinner {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
opacity: 0;
}
#header.meta-init > * {
opacity: 1;
transition: opacity .5s;
-webkit-user-select: auto;
-moz-user-select: auto;
-ms-user-select: auto;
user-select: auto;
}
label:not(.unavailable) {
padding-left: 16px;
position: relative;
}
/* spinner: https://github.com/loadingio/css-spinner */
@keyframes lds-spinner {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes lds-spinner {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.lds-spinner {
position: absolute;
width: 200px;
height: 200px;
top: 50px;
left: 0;
right: 0;
margin: auto;
opacity: .2;
transition: opacity .5s;
}
.lds-spinner div {
left: 94px;
top: 23px;
position: absolute;
-webkit-animation: lds-spinner linear 1s infinite;
animation: lds-spinner linear 1s infinite;
background: currentColor;
width: 12px;
height: 34px;
border-radius: 20%;
-webkit-transform-origin: 6px 77px;
transform-origin: 6px 77px;
}
.lds-spinner div:nth-child(1) {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-animation-delay: -0.916666666666667s;
animation-delay: -0.916666666666667s;
}
.lds-spinner div:nth-child(2) {
-webkit-transform: rotate(30deg);
transform: rotate(30deg);
-webkit-animation-delay: -0.833333333333333s;
animation-delay: -0.833333333333333s;
}
.lds-spinner div:nth-child(3) {
-webkit-transform: rotate(60deg);
transform: rotate(60deg);
-webkit-animation-delay: -0.75s;
animation-delay: -0.75s;
}
.lds-spinner div:nth-child(4) {
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
-webkit-animation-delay: -0.666666666666667s;
animation-delay: -0.666666666666667s;
}
.lds-spinner div:nth-child(5) {
-webkit-transform: rotate(120deg);
transform: rotate(120deg);
-webkit-animation-delay: -0.583333333333333s;
animation-delay: -0.583333333333333s;
}
.lds-spinner div:nth-child(6) {
-webkit-transform: rotate(150deg);
transform: rotate(150deg);
-webkit-animation-delay: -0.5s;
animation-delay: -0.5s;
}
.lds-spinner div:nth-child(7) {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-animation-delay: -0.416666666666667s;
animation-delay: -0.416666666666667s;
}
.lds-spinner div:nth-child(8) {
-webkit-transform: rotate(210deg);
transform: rotate(210deg);
-webkit-animation-delay: -0.333333333333333s;
animation-delay: -0.333333333333333s;
}
.lds-spinner div:nth-child(9) {
-webkit-transform: rotate(240deg);
transform: rotate(240deg);
-webkit-animation-delay: -0.25s;
animation-delay: -0.25s;
}
.lds-spinner div:nth-child(10) {
-webkit-transform: rotate(270deg);
transform: rotate(270deg);
-webkit-animation-delay: -0.166666666666667s;
animation-delay: -0.166666666666667s;
}
.lds-spinner div:nth-child(11) {
-webkit-transform: rotate(300deg);
transform: rotate(300deg);
-webkit-animation-delay: -0.083333333333333s;
animation-delay: -0.083333333333333s;
}
.lds-spinner div:nth-child(12) {
-webkit-transform: rotate(330deg);
transform: rotate(330deg);
-webkit-animation-delay: 0s;
animation-delay: 0s;
}
@-webkit-keyframes load3 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes load3 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
/************ reponsive layouts ************/
@media (max-width: 850px) {
body {
overflow: hidden;
}
.container {
flex-direction: column;
}
#header {
flex: 0 1 auto;
border-right: none;
border-bottom: 1px dashed var(--gray-lightness-66);
overflow-x: auto;
overflow-y: hidden;
padding: 0;
}
#header:not(.meta-init) {
min-height: 300px;
}
.main {
flex: 1;
}
#header-content-wrapper {
display: flex;
flex-wrap: wrap;
padding: .5rem 0 0 1rem;
box-sizing: border-box;
height: min-content;
}
#header-content-wrapper > * {
flex-grow: 1;
margin: 0;
padding: 0 1rem .5rem 0;
min-width: 0;
}
#header-content-wrapper > .meta-description + .flex-wrapper {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 0;
}
#header-content-wrapper > .meta-description + .flex-wrapper > * {
display: flex;
flex-direction: column;
flex: 1;
flex-wrap: wrap;
white-space: nowrap;
padding: 0 1rem .5rem 0;
box-sizing: border-box;
}
.flex-wrapper ul {
margin: 0;
}
#header-content-wrapper > .meta-description {
flex-basis: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.actions {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.set-update-url p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.actions label {
min-width: 100px;
flex: 1;
}
.actions label span {
white-space: nowrap;
}
.has-warnings #header {
min-height: 4em;
max-height: 20%;
}
.warnings {
max-height: 20%;
}
.warning:not(:last-child) {
border-bottom: 1px dashed var(--warning-border);
padding-bottom: 1em;
}
ul.applies-to,
.actions label {
margin: 0;
}
#header-content-wrapper > h1 {
font-size: 1.75em;
display: flex;
align-items: baseline;
}
#header-content-wrapper > h1 > .meta-version {
padding-left: 3px;
}
#header-content-wrapper > h1 > .meta-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#header-content-wrapper > * h3 {
margin: 0 0 .5rem;
}
.install {
flex-shrink: 0;
margin-right: 1em;
}
}
/* Retina-specific stuff here */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.install:after {
background-image: url(../images/icon/32.png);
background-size: 16px 16px;
}
}