gallery/style/shiny/gallery.css

228 lines
3.6 KiB
CSS
Raw Normal View History

2020-07-20 16:40:34 -04:00
@import url(base.css);
:root {
--image-size: 200px;
}
2020-07-23 13:59:07 -04:00
body {
--gap: 1em;
2020-07-24 08:24:26 -04:00
max-width: calc(4 * var(--image-size) + 3 * var(--gap));
2020-07-23 13:59:07 -04:00
padding-left: 4em;
padding-right: 4em;
}
2020-08-03 17:10:52 -04:00
#filters div {
display: grid;
grid-template-columns: 15% auto;
align-items: baseline;
grid-gap: 0.5em 0.75em;
margin: 1em 0 2em 0;
}
#filters h3, #clear, #reset {
2020-08-03 17:10:52 -04:00
margin: 0;
}
#clear, #reset {
font-weight: 400;
font-size: 110%;
2020-08-03 17:10:52 -04:00
}
#filters h3, #clear {
2020-08-03 17:10:52 -04:00
text-align: right;
grid-area: auto / 1;
2020-08-03 17:10:52 -04:00
}
#reset {
text-align: left;
grid-area: auto / 2;
2020-08-03 17:10:52 -04:00
}
@media (max-width: 80rem) {
#filters div {
grid-template-columns: auto;
}
#filters h3, #clear {
text-align: left;
}
}
2020-08-03 17:10:52 -04:00
#filters ul {
font-weight: 400;
font-size: 90%;
margin: 0;
border-radius: 0.5em;
border: 1px solid var(--text-col);
overflow: hidden;
background: var(--text-col);
grid-gap: 1px;
}
#filters ul:focus-within {
box-shadow: var(--focus-box);
}
#filters li {
margin: 0;
flex-grow: 1;
}
#filters li:focus-within {
color: var(--focus-text);
}
#filters label {
display: block;
margin: 0;
border-radius: 0;
padding: 0.15em 0.5em;
text-align: center;
border: none;
box-shadow: none;
}
2020-07-20 16:40:34 -04:00
.grid {
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fill, var(--image-size));
2020-07-23 13:59:07 -04:00
grid-gap: var(--gap);
2020-07-20 16:40:34 -04:00
justify-content: center;
}
.item {
--border-thickness: 2px;
list-style: none;
width: var(--image-size);
height: var(--image-size);
overflow: hidden;
position: relative;
}
.item:not(.year-marker) {
box-shadow: var(--text-shadow);
2020-08-03 13:23:20 -04:00
border: var(--border-thickness) solid var(--text-col);
2020-07-20 16:40:34 -04:00
border-radius: 0.5em;
2020-07-24 08:23:12 -04:00
background: hsl(340, 45%, 65%);
2020-07-20 16:40:34 -04:00
}
2020-08-03 17:06:19 -04:00
.item:focus-within {
box-shadow: var(--focus-box);
}
2020-07-20 16:40:34 -04:00
figure {
margin: 0;
padding: 0;
}
figcaption {
position: absolute;
2020-08-01 09:57:17 -04:00
bottom: -1px;
left: -1px;
width: 100%;
2020-08-03 13:23:20 -04:00
border: 1px solid var(--text-col);
2020-07-20 16:40:34 -04:00
display: block;
text-align: center;
background: hsl(0, 0%, 0%, 75%);
font-size: 80%;
}
.year-marker {
grid-area: auto / 1;
padding: var(--border-thickness);
}
.year-text {
--gap: 0.2em;
display: grid;
grid-template-columns: repeat(2, calc(50% - 3 * var(--gap)));
grid-gap: var(--gap);
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
}
.year-marker .y {
display: block;
text-align: center;
font-size: calc(var(--image-size) * 0.6);
line-height: 0;
font-weight: 900;
transform: scaleX(110%);
}
.item.nsfw::after {
--size: calc(1/4 * var(--image-size));
content: url(../18_plus_white.svg);
height: var(--size);
width: var(--size);
display: inline-block;
position: absolute;
top: 3px;
right: 3px;
2020-07-24 12:40:16 -04:00
transform: rotate(var(--nsfw-sticker-rotate));
2020-07-20 16:40:34 -04:00
mix-blend-mode: multiply;
}
footer {
font-size: 90%;
text-align: center;
margin-top: 1em;
}
2020-07-20 16:40:34 -04:00
@media (hover) {
.item:hover figcaption {
opacity: 20%;
}
@media (prefers-reduced-motion) {
.item:hover figcaption {
transform: translateY(80%);
}
}
@media (prefers-reduced-motion: no-preference) {
.item figcaption {
transition-property: opacity, transform;
transition-duration: 0.25s;
transition-timing-function: ease-in-out;
}
.item:hover figcaption {
transform: translate(-20%, 80%) rotateZ(7deg);
}
}
}
@media (hover: none) {
.item:not(.year-marker) {
height: min-content;
}
figcaption {
position: initial;
}
.item a {
display: block;
height: var(--image-size);
}
.item img {
margin-bottom: 0;
}
}
@media (pointer: coarse) {
#filters label {
font-size: 150%;
}
}