Files
genera-tor/src/styles/global.scss
T
2024-05-30 15:49:20 +02:00

233 lines
3.2 KiB
SCSS

@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;600&display=swap');
$bgCol: #313638;
$accentCol: #ff6060;
$warnCol: #ffe02e;
body,
html {
padding: 0;
margin: 0;
min-height: 100vh;
background-color: $bgCol;
font-family: 'Libre Franklin', sans-serif;
font-weight: 500;
}
* {
box-sizing: border-box;
}
a {
color: white;
text-decoration: none;
&:hover {
color: $accentCol;
}
}
button {
border: none;
outline: none;
background: none;
transition:
color 90ms ease-in,
border 90ms ease-in;
font-family: 'Libre Franklin', sans-serif;
cursor: pointer;
font-weight: bold;
font-size: 1em;
}
button.g-button {
text-align: center;
color: white;
&.action {
border: 2px solid white;
padding: 0.5em;
&:focus-visible {
border: 2px solid $accentCol;
}
&:hover {
color: $accentCol;
}
}
&.option {
position: relative;
margin: 0 0.25em;
padding: 0.25em;
&:focus-visible::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 2px;
background-color: $accentCol;
}
&[data-active='true'] {
color: $accentCol;
}
}
&.text {
padding: 0;
color: #000;
&:focus-visible {
color: $accentCol;
}
}
}
// Text styles
.text {
&--accent {
color: $accentCol;
}
&--warn {
color: $warnCol;
}
}
// Select style
select {
border: 2px solid black;
background: none;
padding: 0.1em 0;
border-radius: 0.3em;
text-align: center;
&:hover {
border: 2px solid $accentCol;
}
}
// List style
ul {
padding: 0;
margin: 0;
list-style: none;
text-align: center;
}
// Global scrollbar style
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: #333;
}
::-webkit-scrollbar-thumb {
background: #888;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}
// Modal
.g-modal {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 1000;
display: flex;
justify-content: center;
align-items: center;
.modal-bg {
position: fixed;
width: 100vw;
height: 100vh;
cursor: pointer;
background-color: #000000aa;
}
.modal-content {
position: relative;
z-index: 1001;
overflow: auto;
}
}
// Checkbox
label.g-checkbox {
display: inline-block;
margin: 0.25em 0;
cursor: pointer;
color: #aaa;
span {
transition: color 125ms ease;
}
span::before {
content: '';
display: inline-block;
width: 1ch;
height: 1ch;
background-color: #aaa;
border-radius: 50%;
margin-right: 0.25em;
transition: background-color 125ms ease;
}
input {
width: 0;
opacity: 0;
&:focus-visible + span {
text-decoration: underline;
}
&:checked + span {
color: greenyellow;
&::before {
background-color: greenyellow;
}
}
}
}
// Tooltip
[data-tooltip] {
cursor: pointer;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
position: absolute;
content: attr(data-tooltip);
color: white;
background: black;
padding: 0.5em;
margin: 0.25em;
max-width: 300px;
z-index: 100;
}