mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-11-02 01:08:30 +00:00
styles: extract components.scss
This commit is contained in:
parent
bc654d4f2b
commit
84ed8f98fb
3 changed files with 75 additions and 68 deletions
|
|
@ -2,7 +2,8 @@ import { render } from 'preact'
|
||||||
|
|
||||||
import '@fontsource/open-sans'
|
import '@fontsource/open-sans'
|
||||||
|
|
||||||
import '~/src/style/base.css'
|
import './style/base.scss'
|
||||||
|
import './style/components.scss'
|
||||||
|
|
||||||
import App from './App'
|
import App from './App'
|
||||||
|
|
||||||
|
|
|
||||||
52
src/style/base.scss
Normal file
52
src/style/base.scss
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/* Layout */
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
margin: 0;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 27px;
|
||||||
|
|
||||||
|
/* To prevent the white flash */
|
||||||
|
background: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#root {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app {
|
||||||
|
min-height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
color: var(--main-color);
|
||||||
|
background-color: var(--bg-color);
|
||||||
|
|
||||||
|
/* Fix for Jumping Scrollbar Issue */
|
||||||
|
padding-left: calc(100vw - 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app > main {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
@media (min-width: 800px) {
|
||||||
|
.app > main {
|
||||||
|
margin: 5vh 0;
|
||||||
|
max-width: 800px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
padding: var(--inner-padding);
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
109
src/style/components.scss
Normal file
109
src/style/components.scss
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
/* Focus */
|
||||||
|
|
||||||
|
*:focus-visible {
|
||||||
|
outline: calc(0.5 * var(--separator-width)) solid var(--main-color);
|
||||||
|
outline-offset: calc(1px + var(--separator-width));
|
||||||
|
}
|
||||||
|
|
||||||
|
*::selection {
|
||||||
|
color: var(--bg-color);
|
||||||
|
background: var(--main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Links */
|
||||||
|
|
||||||
|
a,
|
||||||
|
summary {
|
||||||
|
display: inline;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
border-bottom: var(--separator-width) solid currentColor;
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus,
|
||||||
|
a:hover,
|
||||||
|
summary:focus,
|
||||||
|
summary:hover {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Separators */
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border: 0;
|
||||||
|
height: 0;
|
||||||
|
border-top: var(--separator-width) solid var(--main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Lists */
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
|
||||||
|
button {
|
||||||
|
border: var(--separator-width) solid var(--main-color);
|
||||||
|
background-color: var(--bg-color);
|
||||||
|
color: var(--main-color);
|
||||||
|
padding: var(--inner-padding) calc(4 * var(--inner-padding));
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Inputs */
|
||||||
|
|
||||||
|
input::placeholder {
|
||||||
|
color: var(--main-color);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
select {
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
padding: calc(0.5 * var(--inner-padding)) var(--inner-padding);
|
||||||
|
color: var(--main-color);
|
||||||
|
background-color: var(--bg-color);
|
||||||
|
border: var(--separator-width) solid var(--main-color);
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
width: 250px;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border-radius: 0;
|
||||||
|
background-image: repeating-linear-gradient(
|
||||||
|
315deg,
|
||||||
|
var(--bg-color),
|
||||||
|
var(--bg-color) var(--inner-padding),
|
||||||
|
var(--main-color) var(--inner-padding),
|
||||||
|
var(--main-color) calc(var(--inner-padding) + var(--separator-width)),
|
||||||
|
var(--bg-color) calc(var(--inner-padding) + var(--separator-width)),
|
||||||
|
var(--bg-color) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type='file'] {
|
||||||
|
position: relative;
|
||||||
|
font-size: 0;
|
||||||
|
text-indent: -100%;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue