gallery/style/shiny/gallery.css

266 lines
4.6 KiB
CSS
Raw Normal View History

2020-07-20 16:40:34 -04:00
@import url(base.css);
2020-10-06 16:07:39 -04:00
@import url(nsfw-warning.css);
2020-07-20 16:40:34 -04:00
:root {
--image-size: 200px;
}
2020-10-06 16:07:39 -04:00
.page {
2020-07-23 13:59:07 -04:00
--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, #singles {
2020-08-03 17:10:52 -04:00
margin: 0;
}
#clear, #singles {
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
}
#singles {
2020-08-03 17:10:52 -04:00
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-09-17 13:12:48 -04:00
#filters label[data-count]::after {
content: '(' attr(data-count) ')';
font-size: 80%;
padding-left: 0.25em;
}
2020-08-03 17:10:52 -04:00
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;
}
2020-09-19 01:51:52 -04:00
figcaption .date, figcaption .title {
2020-07-20 16:40:34 -04:00
position: absolute;
2020-08-01 09:57:17 -04:00
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%;
2020-09-19 01:51:52 -04:00
text-shadow: none;
2020-07-20 16:40:34 -04:00
}
2020-09-19 01:51:52 -04:00
figcaption .date { top: -1px; left: -1px; }
figcaption .title { bottom: -1px; left: -1px; }
2020-07-20 16:40:34 -04:00
2020-09-25 17:08:44 -04:00
.date { text-transform: lowercase; }
2020-07-20 16:40:34 -04:00
.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;
2020-08-28 19:54:30 -04:00
font-weight: 800;
2020-07-20 16:40:34 -04:00
transform: scaleX(110%);
}
2020-09-19 01:51:52 -04:00
.item.nsfw::before, .item[data-updated="true"]::after {
2020-07-20 16:40:34 -04:00
height: var(--size);
width: var(--size);
2020-09-19 16:01:15 -04:00
transform: var(--base-transform);
2020-07-20 16:40:34 -04:00
display: inline-block;
position: absolute;
2020-09-19 01:51:52 -04:00
2020-09-19 16:01:15 -04:00
mix-blend-mode: multiply;
2020-09-19 01:51:52 -04:00
}
.item.nsfw::before {
--size: calc(1/4 * var(--image-size));
--base-transform: rotate(var(--nsfw-sticker-rotate));
content: url(../18_plus_white.svg);
2020-09-03 16:32:54 -04:00
top: calc(1em + 3px);
2020-07-20 16:40:34 -04:00
right: 3px;
2020-09-19 01:51:52 -04:00
}
.item[data-updated="true"]::after {
--size: calc(1/4 * var(--image-size));
2020-09-19 16:01:15 -04:00
--base-transform: rotate(-8deg);
2020-09-19 01:51:52 -04:00
content: url(../sparkles.svg);
bottom: calc(1em + 3px);
right: 3px;
2020-07-20 16:40:34 -04:00
}
footer {
font-size: 90%;
text-align: center;
margin-top: 1em;
}
2020-10-06 16:41:26 -04:00
@media (hover) and (pointer: fine) {
2020-09-19 01:51:52 -04:00
.item:hover .date, .item:hover .title,
.item:hover::before, .item:hover::after {
2020-08-30 12:45:13 -04:00
filter: opacity(20%);
2020-07-20 16:40:34 -04:00
}
@media (prefers-reduced-motion: no-preference) {
2020-09-19 01:51:52 -04:00
figcaption .date, figcaption .title, .item::before, .item::after {
2020-08-30 12:45:13 -04:00
transition-property: filter, transform;
2020-09-19 01:51:52 -04:00
transition-duration: 0.15s;
2020-07-20 16:40:34 -04:00
transition-timing-function: ease-in-out;
}
2020-09-19 01:51:52 -04:00
.item:hover .title {
2020-07-20 16:40:34 -04:00
transform: translate(-20%, 80%) rotateZ(7deg);
}
2020-09-03 16:32:54 -04:00
2020-09-19 01:51:52 -04:00
.item:hover .date {
2020-09-03 16:32:54 -04:00
transform: translate(20%, -80%) rotateZ(7deg);
}
2020-09-19 01:51:52 -04:00
.item:hover::before {
transform: translate(1.5em, -1.5em) var(--base-transform);
}
.item:hover::after {
2020-09-19 16:01:15 -04:00
transform: translate(1.5em, 1.5em) var(--base-transform);
2020-09-19 01:51:52 -04:00
}
2020-07-20 16:40:34 -04:00
}
}
2020-10-06 16:41:26 -04:00
@media (not hover), (pointer: coarse) {
.item:not(.year-marker) {
height: min-content;
}
2020-09-19 01:51:52 -04:00
figcaption .date, figcaption .title {
position: initial;
}
2020-10-06 16:41:26 -04:00
figcaption .date {
border-bottom: none;
}
figcaption .title {
border-top: none;
}
2020-09-19 01:51:52 -04:00
figcaption .date::after {
content: ':';
}
.item a {
display: block;
height: var(--image-size);
}
.item img {
margin-bottom: 0;
}
}
@media (pointer: coarse) {
#filters label {
font-size: 150%;
}
}