mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-16 23:23:11 +00:00
Format SCSS with prettier
This commit is contained in:
parent
6a28f6022d
commit
bd7765b376
9 changed files with 1233 additions and 1195 deletions
475
css/main.scss
475
css/main.scss
|
@ -20,42 +20,42 @@
|
|||
|-------------------------------------------------------------
|
||||
*/
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
min-height: 100vh;
|
||||
max-width: 100vw;
|
||||
min-height: 100vh;
|
||||
max-width: 100vw;
|
||||
|
||||
position: relative;
|
||||
position: relative;
|
||||
|
||||
background-color: $bg;
|
||||
background-image: url("../assets/backgrounds/bg.svg");
|
||||
background-color: $bg;
|
||||
background-image: url("../assets/backgrounds/bg.svg");
|
||||
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
|
||||
scroll-behavior: smooth;
|
||||
scroll-behavior: smooth;
|
||||
|
||||
overflow: auto;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0 auto;
|
||||
padding: 1rem;
|
||||
margin: 0 auto;
|
||||
padding: 1rem;
|
||||
|
||||
max-width: 1100px;
|
||||
max-width: 1100px;
|
||||
|
||||
min-height: calc(100vh - 2rem);
|
||||
min-height: calc(100vh - 2rem);
|
||||
|
||||
@include flexDown(space-between);
|
||||
@include flexDown(space-between);
|
||||
|
||||
position: relative;
|
||||
position: relative;
|
||||
|
||||
* {
|
||||
color: $fg;
|
||||
}
|
||||
* {
|
||||
color: $fg;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -64,32 +64,33 @@ body {
|
|||
|-------------------------------------------------------------
|
||||
*/
|
||||
.btn {
|
||||
padding: 0.5rem;
|
||||
padding: 0.5rem;
|
||||
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
|
||||
position: relative;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
font-family: $font-body;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
font-family: $font-body;
|
||||
|
||||
text-decoration: none;
|
||||
text-decoration: none;
|
||||
|
||||
border: none;
|
||||
@if calc($rad - 0.5rem) > 0 {
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
border: none;
|
||||
|
||||
outline: $fg 0 solid;
|
||||
@if calc($rad - 0.5rem) >0 {
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
transition: outline 0.1s;
|
||||
outline: $fg 0 solid;
|
||||
|
||||
/*
|
||||
transition: outline 0.1s;
|
||||
|
||||
/*
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
|
@ -113,13 +114,13 @@ body {
|
|||
}
|
||||
*/
|
||||
|
||||
&:hover {
|
||||
outline: $fg $border-thickness solid;
|
||||
color: $fg;
|
||||
&:hover {
|
||||
outline: $fg $border-thickness solid;
|
||||
color: $fg;
|
||||
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
|
||||
/*
|
||||
/*
|
||||
&::after {
|
||||
opacity: 1;
|
||||
width: calc(100% + calc($border-thickness * 2));
|
||||
|
@ -128,66 +129,70 @@ body {
|
|||
left: calc($border-thickness * -1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
&:where(input[type="file"])::file-selector-button {
|
||||
margin: -0.5rem 0.5rem -0.5rem -0.5rem;
|
||||
padding: 0.5rem;
|
||||
|
||||
display: inline-block;
|
||||
|
||||
font-size: 16px;
|
||||
font-family: $font-body;
|
||||
|
||||
text-decoration: none;
|
||||
|
||||
background-color: $white;
|
||||
|
||||
border: none;
|
||||
|
||||
@if calc($rad - 0.5rem) >0 {
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
&:where(input[type="file"])::file-selector-button {
|
||||
margin: -0.5rem 0.5rem -0.5rem -0.5rem;
|
||||
padding: 0.5rem;
|
||||
&:disabled {
|
||||
cursor: not-allowed;
|
||||
outline: none;
|
||||
|
||||
display: inline-block;
|
||||
z-index: 1;
|
||||
|
||||
font-size: 16px;
|
||||
font-family: $font-body;
|
||||
filter: brightness(0.5) grayscale(0.3);
|
||||
|
||||
text-decoration: none;
|
||||
|
||||
background-color: $white;
|
||||
|
||||
border: none;
|
||||
@if calc($rad - 0.5rem) > 0 {
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
cursor: not-allowed;
|
||||
outline: none;
|
||||
|
||||
z-index: 1;
|
||||
|
||||
filter: brightness(0.5) grayscale(0.3);
|
||||
|
||||
img {
|
||||
display: none;
|
||||
}
|
||||
img {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a.btn {
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.btn-bad {
|
||||
background-color: $warning;
|
||||
background-image: linear-gradient(to top, darken($warning, 5%), $warning);
|
||||
background-color: $warning;
|
||||
background-image: linear-gradient(to top, darken($warning, 5%), $warning);
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
background-color: $alert;
|
||||
background-image: linear-gradient(to top, darken($alert, 5%), $alert);
|
||||
|
||||
background-color: $alert;
|
||||
background-image: linear-gradient(to top, darken($alert, 5%), $alert);
|
||||
}
|
||||
|
||||
.btn-good {
|
||||
background-color: $page-accent;
|
||||
background-image: linear-gradient(to top, darken($page-accent, 5%), $page-accent);
|
||||
|
||||
background-color: $page-accent;
|
||||
background-image: linear-gradient(
|
||||
to top,
|
||||
darken($page-accent, 5%),
|
||||
$page-accent
|
||||
);
|
||||
}
|
||||
|
||||
.btn-neutral {
|
||||
background-color: $neutral;
|
||||
background-image: linear-gradient(to top, darken($neutral, 0.5%), $neutral);
|
||||
|
||||
background-color: $neutral;
|
||||
background-image: linear-gradient(to top, darken($neutral, 0.5%), $neutral);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -196,51 +201,57 @@ a.btn {
|
|||
|-------------------------------------------------------------
|
||||
*/
|
||||
.alert {
|
||||
padding: 0.75rem;
|
||||
padding: 0.75rem;
|
||||
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
font-family: $font-body;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
font-family: $font-body;
|
||||
|
||||
text-decoration: none;
|
||||
text-decoration: none;
|
||||
|
||||
border-left: $border-thickness solid $fg;
|
||||
background-color: $bg;
|
||||
background-repeat: no-repeat;
|
||||
border-left: $border-thickness solid $fg;
|
||||
background-color: $bg;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
@if calc($rad - 0.5rem) > 0 {
|
||||
border-radius: calc($rad - 0.3rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
@if calc($rad - 0.5rem) >0 {
|
||||
border-radius: calc($rad - 0.3rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.alert-bad {
|
||||
border-color: $warning;
|
||||
background-image: linear-gradient(120deg, rgba($warning, 0.3), rgba($bg, 0));
|
||||
border-color: $warning;
|
||||
background-image: linear-gradient(120deg, rgba($warning, 0.3), rgba($bg, 0));
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
border-color: $alert;
|
||||
background-image: linear-gradient(120deg, rgba($alert, 0.3), rgba($bg, 0));
|
||||
border-color: $alert;
|
||||
background-image: linear-gradient(120deg, rgba($alert, 0.3), rgba($bg, 0));
|
||||
}
|
||||
|
||||
.alert-good {
|
||||
border-color: $page-accent;
|
||||
background-image: linear-gradient(120deg, rgba($page-accent, 0.3), rgba($bg, 0));
|
||||
border-color: $page-accent;
|
||||
background-image: linear-gradient(
|
||||
120deg,
|
||||
rgba($page-accent, 0.3),
|
||||
rgba($bg, 0)
|
||||
);
|
||||
}
|
||||
|
||||
.alert-box {
|
||||
> * {
|
||||
margin: 0 0 0.5rem 0;
|
||||
}
|
||||
> * {
|
||||
margin: 0 0 0.5rem 0;
|
||||
}
|
||||
|
||||
> *:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
> *:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -249,51 +260,53 @@ a.btn {
|
|||
|-------------------------------------------------------------
|
||||
*/
|
||||
@mixin badge($color, $fg: $color) {
|
||||
background: rgba($color, 0.3);
|
||||
border: $color $border-thickness solid;
|
||||
background: rgba($color, 0.3);
|
||||
border: $color $border-thickness solid;
|
||||
|
||||
&.link:hover {
|
||||
color: $color;
|
||||
}
|
||||
&.link:hover {
|
||||
color: $color;
|
||||
}
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
//margin: 0 0.25rem;
|
||||
padding: 0.2em 0.4em;
|
||||
border: $black $border-thickness solid;
|
||||
|
||||
@if calc($rad - 0.5rem) >0 {
|
||||
border-radius: calc($rad - 0.3rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
color: $fg;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
font-family: $font-body;
|
||||
line-height: 1;
|
||||
vertical-align: baseline;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
|
||||
&.link {
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
//margin: 0 0.25rem;
|
||||
padding: 0.2em 0.4em;
|
||||
border: $black $border-thickness solid;
|
||||
@if calc($rad - 0.5rem) > 0 {
|
||||
border-radius: calc($rad - 0.3rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
color: $fg;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
font-family: $font-body;
|
||||
line-height: 1;
|
||||
vertical-align: baseline;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.link {
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}
|
||||
&.badge-primary {
|
||||
@include badge($page-accent);
|
||||
}
|
||||
|
||||
&.badge-primary {
|
||||
@include badge($page-accent);
|
||||
}
|
||||
&.badge-critical {
|
||||
@include badge($red);
|
||||
}
|
||||
|
||||
&.badge-critical {
|
||||
@include badge($red);
|
||||
}
|
||||
|
||||
&.badge-warning {
|
||||
@include badge($orange);
|
||||
}
|
||||
&.badge-warning {
|
||||
@include badge($orange);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -302,50 +315,52 @@ a.btn {
|
|||
|-------------------------------------------------------------
|
||||
*/
|
||||
form {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
& > * {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
& > * {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
/*
|
||||
|-------------------------------------------------------------
|
||||
| SVG
|
||||
|-------------------------------------------------------------
|
||||
*/
|
||||
.svg {
|
||||
margin: 0 0.2rem 0.1rem 0;
|
||||
margin: 0 0.2rem 0.1rem 0;
|
||||
|
||||
width: 1.15rem;
|
||||
height: 1.1rem;
|
||||
width: 1.15rem;
|
||||
height: 1.1rem;
|
||||
|
||||
vertical-align: middle;
|
||||
vertical-align: middle;
|
||||
|
||||
display: inline;
|
||||
display: inline;
|
||||
|
||||
@if calc($rad - 0.5rem) > 0 {
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
@if calc($rad - 0.5rem) >0 {
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.loading {
|
||||
animation: spin 1.5s ease-in-out infinite;
|
||||
animation: spin 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -354,9 +369,9 @@ textarea {
|
|||
|-------------------------------------------------------------
|
||||
*/
|
||||
br {
|
||||
margin: 0;
|
||||
margin: 0;
|
||||
|
||||
line-height: 0.25rem;
|
||||
line-height: 0.25rem;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -365,12 +380,12 @@ br {
|
|||
|-------------------------------------------------------------
|
||||
*/
|
||||
a.link {
|
||||
display: inline;
|
||||
text-decoration: underline;
|
||||
display: inline;
|
||||
text-decoration: underline;
|
||||
|
||||
&:hover {
|
||||
color: $page-accent;
|
||||
}
|
||||
&:hover {
|
||||
color: $page-accent;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -379,69 +394,71 @@ a.link {
|
|||
|-------------------------------------------------------------
|
||||
*/
|
||||
#back-to-top {
|
||||
margin: 0;
|
||||
padding: 0.5rem;
|
||||
margin: 0;
|
||||
padding: 0.5rem;
|
||||
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
right: -2.5rem;
|
||||
bottom: 1rem;
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
right: -2.5rem;
|
||||
bottom: 1rem;
|
||||
|
||||
object-position: center;
|
||||
|
||||
background-color: $bg-alt;
|
||||
backdrop-filter: blur(8px);
|
||||
|
||||
@if calc($rad - 0.5rem) >0 {
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
box-shadow: $shadow;
|
||||
|
||||
transition: right 0.15s cubic-bezier(0.19, 1, 0.22, 1);
|
||||
|
||||
&:hover {
|
||||
outline: 0.2rem solid $green;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
|
||||
display: block;
|
||||
|
||||
object-position: center;
|
||||
|
||||
background-color: $bg-alt;
|
||||
backdrop-filter: blur(8px);
|
||||
|
||||
@if calc($rad - 0.5rem) > 0 {
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
box-shadow: $shadow;
|
||||
|
||||
transition: right 0.15s cubic-bezier(.19, 1, .22, 1);
|
||||
|
||||
&:hover {
|
||||
outline: 0.2rem solid $green;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
|
||||
display: block;
|
||||
|
||||
object-position: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media(prefers-reduced-motion){
|
||||
* {
|
||||
transition: none !important;
|
||||
}
|
||||
@media (prefers-reduced-motion) {
|
||||
* {
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.hr {
|
||||
margin: 0.5rem 0;
|
||||
margin: 0.5rem 0;
|
||||
|
||||
border: none;
|
||||
border-top: $border-thickness solid $fg;
|
||||
border: none;
|
||||
border-top: $border-thickness solid $fg;
|
||||
}
|
||||
|
||||
.hr-full {
|
||||
margin-left: -0.5rem;
|
||||
margin-right: -0.5rem;
|
||||
margin-left: -0.5rem;
|
||||
margin-right: -0.5rem;
|
||||
}
|
||||
|
||||
.hr-bad {
|
||||
border-color: $warning;
|
||||
border-color: $warning;
|
||||
}
|
||||
|
||||
.hr-warning {
|
||||
border-color: $alert;
|
||||
border-color: $alert;
|
||||
}
|
||||
|
||||
.hr-good {
|
||||
border-color: $page-accent;
|
||||
}
|
||||
border-color: $page-accent;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue