summaryrefslogtreecommitdiff
path: root/stylesheets/galerie.css
blob: 5ce768aba021112964d709ae5807d1ea66fef77b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
main h1 {
    color: #1f4e79;
}

.mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--mosaic-side), 1fr));
    grid-gap: 0.8em;
}

.mosaic .photo {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
}
.mosaic img {
    position: absolute;
    object-position: center;
    object-fit: cover;
    height: 100%;
    width: 100%;
    transition: filter 0.5s;
}

.photo p.credits:before {
    content: '© ';
}
.photo p.credits {
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 0;
    color: white;
    background: #0008;
    border-top-left-radius: 0.5em;
    padding: 0 0.2em;
    font-size: small;
}

.mosaic .video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;           /* 9/16 */
}
.mosaic .video .yt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (min-width: 50em) {
    .mosaic.photos {
        --mosaic-side: 14em;
    }
    .mosaic.videos {
        --mosaic-side: 25em;
    }

    .photo p.credits > .name {
        display: none;
    }
    .photo p.credits:hover > .name {
        display: initial;
    }
}

@media not all and (min-width: 50em) {
    .mosaic.photos {
        --mosaic-side: 8em;
    }
    .mosaic.videos {
        --mosaic-side: 18em;
    }
}