PoorBooru/public/css/style.css

210 lines
3.2 KiB
CSS

/*
* PoorBooru - Poorman's booru
*
* Written in 2023 by Lucas
*
* To the extent possible under law, the author(s) have dedicated all
* copyright and related and neighboring rights to this software to the
* public domain worldwide. This software is distributed without any
* warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication
* along with this software. If not, see
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
/*
* Some parts copied from https://piccalil.li/blog/a-modern-css-reset/
*/
:root {
--dark-theme-bg: #0c0700;
--dark-theme-text: #fff8f0;
--dark-theme-accent: #ec57bc;
--dark-theme-accent-hover: #f7be00;
--light-theme-bg: #fff8f0;
--light-theme-text: #0c0700;
--light-theme-accent: #dc3a23;
--light-theme-accent-hover: #4997ce;
--bg: var(--dark-theme-bg);
--text: var(--dark-theme-text);
--accent: var(--dark-theme-accent);
--accent-hover: var(--dark-theme-accent-hover);
--gap: 1.5rem;
--column-width: 15rem;
--viewport-width: 15rem;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
dd,
dl,
dt,
h1,
p {
margin: 0;
}
body {
margin: 0 auto;
min-height: 100vh;
background-color: var(--bg);
color: var(--text);
font-family: monospace;
font-size: 1rem;
line-height: 1.5;
}
dl,
h1,
p {
margin-bottom: var(--gap);
}
footer > p {
margin-bottom: 0;
}
h1 {
text-align: center;
font-size: 3rem;
line-height: 2;
}
a,
a:link,
a:visited {
color: var(--accent);
}
a:hover,
a:active {
color: var(--accent-hover);
}
img {
max-width: 100%;
height: auto;
}
body > header {
border-bottom: 0.0625rem solid var(--accent);
}
body > header > nav {
gap: 0 var(--gap);
}
body > header > nav > a {
font-weight: bold;
text-decoration: none;
}
main {
border-top: 0.0625rem solid;
border-bottom: 0.0625rem solid;
border-color: var(--accent);
padding-top: var(--gap);
margin-top: 0.1875rem;
margin-bottom: 0.1875rem;
}
body > footer {
border-top: 0.0625rem solid var(--accent);
}
.leading-loose {
line-height: 3;
}
dt {
font-weight: bold;
}
dd {
margin-left: 3rem;
}
.viewport {
margin-left: auto;
margin-right: auto;
width: var(--viewport-width);
}
.text-center {
text-align: center;
}
.text-big {
font-size: 1.25rem;
line-height: 2.4;
}
.gallery {
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: var(--gap);
margin-bottom: var(--gap);
}
.gallery > a {
flex-basis: calc(var(--column-width) - var(--gap));
line-height: 0;
}
.gallery > a:link,
.gallery > a:visited {
outline-offset: 0.1875rem;
outline: 0.0625rem solid;
outline-color: var(--accent);
}
.gallery > a:hover,
.gallery > a:active {
outline-color: var(--accent-hover);
}
.flex-c-horizontal {
display: flex;
}
.flex-c-vertical {
display: flex;
flex-direction: column;
}
.flex-i-fullsize {
flex: auto;
}
@media screen and (min-width: 30rem) {
:root {
--viewport-width: 30rem;
}
}
@media screen and (min-width: 45rem) {
:root {
--viewport-width: 45rem;
}
}
@media screen and (min-width: 60rem) {
:root {
--viewport-width: 60rem;
}
}
@media screen and (min-width: 90rem) {
:root {
--viewport-width: 90rem;
}
}