-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfigure.css
111 lines (90 loc) · 1.62 KB
/
figure.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
img {
margin: 1.25em 1.25em 1.5em;
cursor: zoom-in;
height: auto;
}
img.zoomed {
cursor: zoom-out;
}
table img {
margin: 0
}
.image-container, .left, .left .side, .right, .right .side, figure {
max-width: 75%
}
.left img {
border-top-right-radius: 0.5em;
border-bottom-right-radius: 0.5em;
}
.right img {
border-top-left-radius: 0.5em;
border-bottom-left-radius: 0.5em;
}
figure:nth-child(even), .left, figure.left, figure.left.side {
float: left;
margin-left: 0;
margin-right: 1.5em
}
figure:nth-child(odd), .right, figure.right, figure.right.side {
float: right;
margin-left: 1.5em;
margin-right: 0
}
caption, figcaption {
font-size: 0.8em;
color: dimgray;
margin: 0;
caption-side: bottom;
background: inherit;
width: 0;
min-width: 100%;
}
figure {
position: relative;
z-index: 1;
max-height: 90%;
transition: background-color .2s ease-out
}
figure ul {
padding-left: 1em;
}
figure.video {
overflow: hidden;
padding-bottom: 56.25%;
position: relative;
height: 0;
width: 100%;
}
figure img {
margin: 0;
}
figure:hover {
background-color: rgba(127, 127, 127, 0.1);
}
figure iframe {
left: 0;
top: 0;
height: 100%;
width: 100%;
position: absolute;
}
figure:hover figcaption, figcaption:hover {
color: black;
}
.right figcaption, .right .side figcaption {
text-align: right
}
.left figcaption, .left.side figcaption {
text-align: left
}
@media (prefers-color-scheme: dark) {
figcaption {
color: darkgray;
}
figure:hover {
background-color: rgba(255, 255, 255, 0.1);
}
figure:hover figcaption, figcaption:hover {
color: white;
}
}