104 lines
No EOL
2.1 KiB
CSS
104 lines
No EOL
2.1 KiB
CSS
:root {
|
|
--grid-square: repeat(2, minmax(0, 1fr));
|
|
--grid-vertical: repeat(3, minmax(0, 1fr));
|
|
}
|
|
|
|
.media-grid {
|
|
display: grid;
|
|
gap: var(--sizing-sm);
|
|
margin-bottom: var(--sizing-base);
|
|
|
|
&.no-pagination {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
&.square {
|
|
grid-template-columns: var(--grid-square);
|
|
|
|
& a {
|
|
aspect-ratio: var(--aspect-ratio-square);
|
|
}
|
|
|
|
& img {
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: var(--border-radius-slight);
|
|
}
|
|
}
|
|
|
|
&.vertical {
|
|
grid-template-columns: var(--grid-vertical);
|
|
|
|
& a {
|
|
aspect-ratio: var(--aspect-ratio-vertical);
|
|
}
|
|
|
|
& img {
|
|
width: 100%;
|
|
height: auto;
|
|
border-radius: var(--border-radius-slight);
|
|
}
|
|
}
|
|
|
|
& .item-wrapper {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
display: flex;
|
|
|
|
&.shadow::after {
|
|
position: absolute;
|
|
z-index: 1;
|
|
content: '';
|
|
top: 0;
|
|
left: 0;
|
|
box-shadow: inset 0 -85px 60px -60px var(--black);
|
|
width: 100%;
|
|
height: 100%;
|
|
border: var(--border-default);
|
|
border-radius: var(--border-radius-slight);
|
|
transition-property: border-color;
|
|
transition-timing-function: var(--transition-ease-in-out);
|
|
transition-duration: 300ms;
|
|
}
|
|
}
|
|
|
|
& a:hover .item-wrapper.shadow::after,
|
|
& a:active .item-wrapper.shadow::after {
|
|
border-color: var(--accent-color-hover)
|
|
}
|
|
|
|
& a:focus .item-wrapper.shadow::after,
|
|
& a:focus-within .item-wrapper.shadow::after {
|
|
border: 0;
|
|
outline: var(----outline-default);
|
|
}
|
|
|
|
& .meta-text {
|
|
position: absolute;
|
|
z-index: 2;
|
|
padding: 0 var(--sizing-sm);
|
|
bottom: var(--sizing-sm);
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
|
|
& .header,
|
|
& .subheader {
|
|
color: var(--color-lightest);
|
|
font-size: var(--font-size-sm);
|
|
line-height: 1.5;
|
|
text-shadow: var(--black) 0px 0px 10px;
|
|
}
|
|
|
|
& .header {
|
|
font-weight: var(--font-weight-bold);
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (min-width: 768px) {
|
|
:root {
|
|
--grid-square: repeat(4, minmax(0, 1fr));
|
|
--grid-vertical: repeat(6, minmax(0, 1fr));
|
|
}
|
|
} |