#event-list { max-height: 60vh; overflow: auto; scrollbar-width: thin; scrollbar-color: black #ddd; } #event-list::-webkit-scrollbar { width: 0.25em; height: 0.25em; } #event-list::-webkit-scrollbar-track { background: #ddd; } #event-list::-webkit-scrollbar-thumb { background: black; } .events { display: grid; grid-auto-rows: var(--cell-height); grid-template-columns: repeat(auto-fit, minmax(var(--cell-width), 0.5fr)); grid-gap: 0.8em; } a.event { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; text-decoration: none; } .event .summary { font-weight: bold; color: white; text-align: center; } #event-details { /* Align with photos; #event-list h1 has font-size 2em and margin * .67em; browsers default line-height to "roughly 1.2". */ margin-top: calc(2*0.67em + 2*1.2em); } .details > .detail { display: grid; grid-template-columns: 2em 1fr; } .detail.date::before { content: "📅"; } .detail.time::before { content: "🕗"; } .detail.place::before { content: "📌"; } .detail.program::before { content: "🎼"; } .details > .detail::before { grid-column: 1; } .details > .detail > * { grid-column: 2; } .detail.program { padding-left: 0; list-style: none; } .photo-credits { font-size: x-small; } @media (min-width: 40em) { main { display: grid; grid-template-columns: 60% 40%; } main > div { padding-left: 1em; padding-right: 1em; } .events { --cell-width: 14em; --cell-height: 12em; } a.event { position: relative; } .event img { position: absolute; object-position: center; object-fit: cover; height: 100%; width: 100%; transition: 0.5s; } .event:not(.active):hover img, .event:not(.active):focus-within img, .event.active img { filter: grayscale(0.8) brightness(0.4); } .event .summary { opacity: 0; z-index: 1; transition: 0.5s; } .event:not(.active):hover .summary, .event:not(.active):focus-within .summary, .event.active .summary { opacity: 1; } } @media (max-width: 40em) { .events { --cell-width: 10em; --cell-height: 8em; } .event { position: relative; } .event img { object-position: center; object-fit: cover; height: 100%; width: 100%; } .event .summary { position: absolute; text-align: center; bottom: 0; margin: 0; width: 100%; background: #0008; } }