501 lines
8.6 KiB
SCSS
501 lines
8.6 KiB
SCSS
/*
|
|
Xeltica Design CSS Framework
|
|
(C)2020 Xeltica
|
|
*/
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
line-height: 1.8em;
|
|
}
|
|
|
|
html {
|
|
$primary: rgb(134, 179, 0);
|
|
$fg: rgba(255, 255, 255, 0.8);
|
|
$bg: rgba(24, 24, 24, 0.8);
|
|
$overlay: transparentize($bg, 0.5);
|
|
$danger: #c72c2c;
|
|
font-size: 18px;
|
|
@media screen and (max-width: 640px) {
|
|
font-size: 15px;
|
|
}
|
|
--primary: #{$primary};
|
|
--primary-light: #{lighten($primary, 5%)};
|
|
--primary-dark: #{darken($primary, 5%)};
|
|
--primary-fg: white;
|
|
--bg: #{$bg};
|
|
--bg-pale-1: #{darken($bg, 5%)};
|
|
--bg-pale-2: #{darken($bg, 10%)};
|
|
--overlay: #{$overlay};
|
|
--fg: #{$fg};
|
|
// --divider: rgba(70, 70, 70, 0.25);
|
|
--radius: 0px;
|
|
--margin: 16px;
|
|
|
|
--bg-danger: #{$danger};
|
|
--fg-danger: white;
|
|
--divider-danger: #400e0e;
|
|
--bg-danger-lighten: #{lighten($danger, 5%)};
|
|
--bg-danger-darken: #{darken($danger, 5%)};
|
|
}
|
|
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--fg);
|
|
}
|
|
|
|
h1, h2, h3, h4, h5, h6 {
|
|
font-weight: normal;
|
|
margin: 0;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
dl {
|
|
margin: 0;
|
|
> dt {
|
|
font-weight: bold;
|
|
}
|
|
> dd {
|
|
margin-left: 2rem;
|
|
@media screen and (max-width: 640px) {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
h1 { font-size: 2.5rem; }
|
|
h2 { font-size: 1.6rem; }
|
|
h3 { font-size: 1.4rem; }
|
|
h4 { font-size: 1.2rem; }
|
|
h5 { font-size: 1.1rem; }
|
|
h6 { font-size: 1.05rem; }
|
|
|
|
input.xd-input {
|
|
outline: none;
|
|
border-radius: var(--radius);
|
|
color: var(--fg);
|
|
background: transparent;
|
|
border: 1px solid var(--fg);
|
|
padding: 2px 8px;
|
|
font-size: 1rem;
|
|
|
|
&:focus {
|
|
border-color: var(--primary);
|
|
}
|
|
}
|
|
|
|
p {
|
|
margin: 1em 0;
|
|
&:first-child {
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
|
|
.xd-inputs {
|
|
display: flex;
|
|
> *:not(:first-child) {
|
|
border-left: none;
|
|
border-top-left-radius: 0;
|
|
border-bottom-left-radius: 0;
|
|
}
|
|
|
|
> *:not(:last-child) {
|
|
border-top-right-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
}
|
|
}
|
|
|
|
.xd-main {
|
|
background: var(--bg);
|
|
padding: 32px;
|
|
border-radius: var(--radius);
|
|
border: 1px solid var(--divider);
|
|
max-width: 960px;
|
|
margin: 24px auto;
|
|
backdrop-filter: blur(32px) saturate(4);
|
|
-webkit-backdrop-filter: blur(32px) saturate(4);
|
|
box-shadow: 0 0 16px black;
|
|
}
|
|
|
|
button, .xd-button {
|
|
display: flex;
|
|
color: var(--fg);
|
|
background: var(--bg);
|
|
border: 1px solid var(--bg-pale-1);
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: var(--radius);
|
|
font-size: 1rem;
|
|
outline: none;
|
|
padding: 2px 8px;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
|
|
&:hover, &:focus {
|
|
background: var(--bg-pale-1);
|
|
}
|
|
&:active {
|
|
background: var(--bg-pale-2);
|
|
}
|
|
|
|
&.primary {
|
|
background: var(--primary);
|
|
color: var(--primary-fg);
|
|
border-color: var(--primary-dark);
|
|
&:hover, &:focus {
|
|
background: var(--primary-light);
|
|
}
|
|
&:active {
|
|
background: var(--primary-dark);
|
|
}
|
|
}
|
|
|
|
&.danger {
|
|
background: var(--bg-danger);
|
|
color: white;
|
|
border-color: var(--divider-danger);
|
|
&:hover, &:focus {
|
|
background: var(--bg-danger-lighten);
|
|
}
|
|
&:active {
|
|
background: var(--bg-danger-lighten);
|
|
}
|
|
}
|
|
}
|
|
|
|
textarea {
|
|
width: 100%;
|
|
font-size: 1rem;
|
|
padding: 16px;
|
|
border-radius: var(--radius);
|
|
background: var(--overlay);
|
|
border: none;
|
|
outline: none;
|
|
height: 8rem;
|
|
line-height: 1;
|
|
&:focus {
|
|
border: 1px solid var(--primary);
|
|
color: var(--fg);
|
|
}
|
|
}
|
|
|
|
// ul, ol {
|
|
// > ul, > ol {
|
|
// margin-bottom: 0;
|
|
// }
|
|
// }
|
|
|
|
a, .link {
|
|
text-decoration: none;
|
|
color: var(--primary);
|
|
&:hover {
|
|
opacity: 0.7;
|
|
}
|
|
}
|
|
|
|
table {
|
|
border: 1px solid var(--divider);
|
|
border-radius: var(--radius);
|
|
background: var(--overlay);
|
|
width: 100%;
|
|
|
|
> thead {
|
|
background: var(--overlay);
|
|
margin-bottom: 2px;
|
|
text-align: left;
|
|
}
|
|
> tbody > tr {
|
|
border-bottom: 1px solid var(--overlay);
|
|
}
|
|
th, td {
|
|
padding: 4px 8px;
|
|
}
|
|
}
|
|
|
|
code {
|
|
border-radius: var(--radius);
|
|
color: #0f0;
|
|
background: #000;
|
|
padding: 8px;
|
|
}
|
|
|
|
.xd-container {
|
|
max-width: 960px;
|
|
margin: 64px auto;
|
|
}
|
|
|
|
.xd-hstack {
|
|
display: flex;
|
|
> *:not(:last-child) {
|
|
margin-right: var(--margin);
|
|
}
|
|
|
|
> * {
|
|
width: 100%;
|
|
}
|
|
|
|
@media screen and (max-width: 640px) {
|
|
flex-direction: column;
|
|
> * {
|
|
margin-bottom: var(--margin);
|
|
}
|
|
}
|
|
}
|
|
|
|
.xd-vstack {
|
|
display: flex;
|
|
flex-direction: column;
|
|
> *:not(:last-child) {
|
|
margin-bottom: var(--margin);
|
|
}
|
|
}
|
|
|
|
.xd-card {
|
|
background: var(--bg);
|
|
padding: 16px;
|
|
border-radius: var(--radius);
|
|
border: 1px solid var(--divider);
|
|
// backdrop-filter: blur(32px) saturate(4);
|
|
// -webkit-backdrop-filter: blur(32px) saturate(4);
|
|
box-shadow: 0 0 16px black;
|
|
overflow: hidden;
|
|
|
|
|
|
h1 { font-size: 2rem; }
|
|
h2 { font-size: 1.5rem; }
|
|
h3 { font-size: 1.3rem; }
|
|
h4 { font-size: 1.17rem; }
|
|
h5 { font-size: 1.12rem; }
|
|
h6 { font-size: 1.08rem; }
|
|
|
|
> .media {
|
|
width: 100%;
|
|
height: auto;
|
|
object-fit: cover;
|
|
}
|
|
|
|
> .body {
|
|
padding: 16px;
|
|
}
|
|
|
|
> .header, > .footer {
|
|
padding: 8px 16px;
|
|
}
|
|
|
|
> .header {
|
|
> h1.title {
|
|
font-size: 1.5rem;
|
|
margin: 0;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
|
|
> .footer {
|
|
background: var(--bg-pale-1);
|
|
border-top: 1px solid var(--divider);
|
|
}
|
|
@media screen and (max-width: 640px) {
|
|
border-radius: 0;
|
|
}
|
|
}
|
|
|
|
.xd-cards {
|
|
list-style: none;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-wrap: nowrap;
|
|
justify-content: left;
|
|
|
|
> .xd-card {
|
|
width: 100%;
|
|
margin: 8px;
|
|
}
|
|
|
|
&.center {
|
|
justify-content: center;
|
|
}
|
|
@media screen and (max-width: 640px) {
|
|
flex-wrap: wrap;
|
|
> .xd-card {
|
|
margin: 8px 0;
|
|
}
|
|
}
|
|
|
|
&.wrap {
|
|
flex-wrap: wrap;
|
|
}
|
|
}
|
|
|
|
.mx-auto { margin-left: auto; margin-right: auto; }
|
|
.my-auto { margin-top: auto; margin-bottom: auto; }
|
|
|
|
.px-auto { padding-left: auto; padding-right: auto; }
|
|
.py-auto { padding-top: auto; padding-bottom: auto; }
|
|
|
|
@for $v from -5 through 5 {
|
|
$size: $v * 8px;
|
|
.ma-#{$v} { margin: $size; }
|
|
.ml-#{$v} { margin-left: $size; }
|
|
.mr-#{$v} { margin-right: $size; }
|
|
.mt-#{$v} { margin-top: $size; }
|
|
.mb-#{$v} { margin-bottom: $size; }
|
|
.mx-#{$v} { margin-left: $size; margin-right: $size; }
|
|
.my-#{$v} { margin-top: $size; margin-bottom: $size; }
|
|
|
|
.pa-#{$v} { padding: $size; }
|
|
.pl-#{$v} { padding-left: $size; }
|
|
.pr-#{$v} { padding-right: $size; }
|
|
.pt-#{$v} { padding-top: $size; }
|
|
.pb-#{$v} { padding-bottom: $size; }
|
|
.px-#{$v} { padding-left: $size; padding-right: $size; }
|
|
.py-#{$v} { padding-top: $size; padding-bottom: $size; }
|
|
}
|
|
|
|
.xd-slide-in {
|
|
animation: slideIn 1s ease-out;
|
|
}
|
|
|
|
@keyframes slideIn {
|
|
0% {
|
|
transform: translateY(32px);
|
|
opacity: 0;
|
|
}
|
|
|
|
100% {
|
|
transform: none;
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
figure {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
@each $mode in none, block, inline, flex, grid, inline-block, inline-flex {
|
|
.display-#{$mode} { display: $mode; }
|
|
}
|
|
|
|
@media screen and (min-width: 901px) {
|
|
.hide-on-pc {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 900px) and (min-width: 641px) {
|
|
.hide-on-tablet {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 640px) {
|
|
.hide-on-mobile {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
@for $i from -18 through 18 {
|
|
.xd-tilt-#{$i * 5} {
|
|
display: inline-block;
|
|
transform: rotateZ($i * 5deg);
|
|
}
|
|
}
|
|
|
|
@keyframes blink {
|
|
0% { opacity: 1 }
|
|
10% { opacity: 1 }
|
|
12% { opacity: 0 }
|
|
14% { opacity: 1 }
|
|
20% { opacity: 1 }
|
|
21% { opacity: 0 }
|
|
39% { opacity: 0 }
|
|
40% { opacity: 1 }
|
|
48% { opacity: 1 }
|
|
49% { opacity: 0 }
|
|
50% { opacity: 1 }
|
|
54% { opacity: 1 }
|
|
55% { opacity: 0 }
|
|
56% { opacity: 1 }
|
|
85% { opacity: 1 }
|
|
89% { opacity: 0 }
|
|
95% { opacity: 1 }
|
|
}
|
|
|
|
.xd-big {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.xd-small {
|
|
font-size: 0.5rem;
|
|
}
|
|
|
|
.xd-blink {
|
|
animation: blink 2s infinite linear;
|
|
}
|
|
|
|
.xd-fluid {
|
|
width: 100%;
|
|
}
|
|
|
|
img, .xd-responsive {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.xd-footer {
|
|
text-align: center;
|
|
// background: darken($bg, 2);
|
|
}
|
|
|
|
.xd-columns {
|
|
display: flex;
|
|
|
|
@media screen and (max-width: 640px) {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.xd-column {
|
|
&.gap-1 { margin: 8px; }
|
|
&.gap-2 { margin: 16px; }
|
|
&.gap-3 { margin: 24px; }
|
|
}
|
|
}
|
|
|
|
.xd-alert {
|
|
padding: 8px 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
border-radius: var(--radius);
|
|
width: 100%;
|
|
background: var(--bg);
|
|
border: 1px solid var(--bg-pale-2);
|
|
color: var(--fg);
|
|
font-size: 75%;
|
|
|
|
> .icon {
|
|
opacity: 0.5;
|
|
font-size: 1.2rem;
|
|
margin-right: 16px;
|
|
}
|
|
|
|
&.danger {
|
|
> .icon {
|
|
opacity: 1;
|
|
}
|
|
background: var(--bg-danger);
|
|
border: 1px solid var(--divider-danger);
|
|
color: var(--fg-danger);
|
|
}
|
|
|
|
}
|
|
|
|
.xd-center {
|
|
text-align: center;
|
|
}
|
|
|
|
.xd-centerized {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
} |