-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery-page.css
64 lines (54 loc) · 1.59 KB
/
gallery-page.css
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
.gal-body {
margin: 0;
min-height: 100vh;
display: grid;
place-items: center;
}
.gallery-main-head{
font-family: "Display";
color: #1e3a6e;
text-align: center;
font-size: 50px ;
}
.gallery {
--size: 100px;
display: grid;
grid-template-columns: repeat(6, var(--size));
grid-auto-rows: var(--size);
margin-bottom: var(--size);
place-items: start center;
gap: 5px;
&:has(:hover) a:not(:hover),
&:has(:focus) a:not(:focus) {
filter: brightness(0.5) contrast(0.5);
}
& a {
object-fit: cover;
width: calc(var(--size) * 2);
height: calc(var(--size) * 2);
clip-path: path("M90,10 C100,0 100,0 110,10 190,90 190,90 190,90 200,100 200,100 190,110 190,110 110,190 110,190 100,200 100,200 90,190 90,190 10,110 10,110 0,100 0,100 10,90Z");
transition: clip-path 0.25s, filter 0.75s;
grid-column: auto / span 2;
border-radius: 5px;
position: relative;
&:nth-child(5n - 1) {
grid-column: 2 / span 2
}
&:hover,
&:focus {
clip-path: path("M0,0 C0,0 200,0 200,0 200,0 200,100 200,100 200,100 200,200 200,200 200,200 100,200 100,200 100,200 100,200 0,200 0,200 0,100 0,100 0,100 0,100 0,100Z");
z-index: 1;
transition: clip-path 0.25s, filter 0.25s;
}
&:focus {
outline: 1px dashed black;
outline-offset: -5px;
}
& img {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
}
}
}