summaryrefslogtreecommitdiff
path: root/quatuor.css
blob: 168caf556866b8c57b7fa517cea44d8b9fe8ea79 (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
main {
    display: flex;
}

main div {
    padding: 2%;
}

main #photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;

    position: sticky;
    top: 0;

    /* ⚠ Keep this bigger than vertical displacement of lowest photo,
       otherwise Firefox glitches: it shows a scrollbar for <main>,
       yet refuses to scroll #photos; #bio scrolls into infinite
       emptiness… */
    padding-top: 2em;
    padding-bottom: 2em;
}

#photos > * {
    position: relative;
    width: 6em;
    height: 100%;
    border-color: #ddd;
    border-width: 0.3em;
    border-style: solid;
    border-radius: 0.3em;
    box-sizing: border-box;
    overflow: hidden;
}

#photos img.portrait {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(1);
    transition: filter 1s, transform 1s;
}

#photos img.portrait:hover {
    filter: none;
    transform: scale(1.05);
}

#photos > *:nth-of-type(1) {
    top: -0.4em;
}

#photos > *:nth-of-type(2) {
    left: -1.6em;
    top: 1.2em;
}

#photos > *:nth-of-type(3) {
    left: 1.6em;
    top: -1.2em;
}

#photos > *:nth-of-type(4) {
    top: 0.4em;
}