-
Notifications
You must be signed in to change notification settings - Fork 6
/
captionss.css
220 lines (209 loc) · 4.97 KB
/
captionss.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
/*
* captionss 1.1.0
* Sensible CSS Image Captions
* http://captionss.com
*/
/*** Base Caption Styles ***/
figure.embed,
figure.embed-top,
figure.overlay,
figure.embed-over {
display: inline-block;
vertical-align: top;
position: relative;
margin: 0em;
font-size: 0.8em;
background: white;
overflow: hidden;
}
figure.embed img,
figure.embed-top img,
figure.overlay img,
figure.embed-over img {
width: 100%;
display: block;
}
figure.embed figcaption,
figure.embed-top figcaption,
figure.overlay figcaption,
figure.embed-over figcaption {
width: 100%;
padding: 0.5em;
/* neutral theme */
color: rgba(50,50,50,1.0);
background: rgba(200,200,200,0.825);
}
/* use border-box box-sizing for each type of caption */
figure.embed *,
figure.embed-top *,
figure.overlay *,
figure.embed-over * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/*** Embed ***/
/* Positioning: bottom (default) */
/* Effects: static (default) */
/* Font-size: normal (default) */
/* Theme: neutral (default) */
figure.embed figcaption {
/* positioning: bottom */
position: absolute;
bottom: 0px;
}
/*** Embed-Top ***/
figure.embed-top figcaption {
/* positioning: top */
position: absolute;
top: 0px;
}
/*** Overlay ***/
figure.overlay figcaption,
figure.embed-over figcaption {
/* positioning: over */
width: 100%;
height: 100%;
position: absolute;
top: 0px;
/* effect: hide by default */
opacity: 0;
}
figure.overlay:hover figcaption,
figure.embed-over:hover figcaption {
/* effect: show */
opacity: 1;
}
/*** Themes ***/
/* neutral theme: gray with black text */
/* It is embedded in above rules, but here for reference: */
/*
figure.neutral figcaption {
color: rgba(50,50,50,1.0);
background: rgba(200,200,200,0.825);
}
*/
/* light theme: white with gray text */
figure.embed.light figcaption,
figure.embed-top.light figcaption,
figure.overlay.light figcaption,
figure.embed-over.light figcaption,
figure.light figcaption {
color: rgba(80,80,80,1.0);
background: rgba(245,245,245,0.825);
}
/* dark theme: black with white text */
figure.embed.dark figcaption,
figure.embed-top.dark figcaption,
figure.overlay.dark figcaption,
figure.embed-over.dark figcaption,
figure.dark figcaption {
color: rgba(245,245,245,1.0);
background: rgba(50,50,50,0.7);
}
/*** Font Sizes ***/
/* normal (small), embedded in above rules */
/*
figure.normal {
font-size: 0.8em;
}
*/
/* medium */
figure.embed.medium,
figure.embed-top.medium,
figure.overlay.medium,
figure.embed-over.medium,
figure.medium {
font-size: 1.0em;
}
figure.embed.large,
figure.embed-top.large,
figure.overlay.large,
figure.embed-over.large,
figure.large {
font-size: 1.2em;
}
figure.embed.xlarge,
figure.embed-top.xlarge,
figure.overlay.xlarge,
figure.embed-over.xlarge,
figure.xlarge {
font-size: 1.5em;
}
/*** Effects and Animations ***/
/* hide */
figure.embed.hide figcaption,
figure.embed-top.hide figcaption,
figure.overlay.hide figcaption,
figure.embed-over.hide figcaption,
figure.hide figcaption {
opacity: 1;
}
figure.embed.hide:hover figcaption,
figure.embed-top.hide:hover figcaption,
figure.overlay.hide:hover figcaption,
figure.embed-over.hide:hover figcaption,
figure.hide:hover figcaption {
opacity: 0;
}
/* hide-smooth */
figure.embed.hide-smooth figcaption,
figure.embed-top.hide-smooth figcaption,
figure.overlay.hide-smooth figcaption,
figure.embed-over.hide-smooth figcaption,
figure.hide-smooth figcaption {
opacity: 1;
-webkit-transition: opacity .5s;
-moz-transition: opacity .5s;
-o-transition: opacity .5s;
transition: opacity .5s;
}
figure.embed.hide-smooth:hover figcaption,
figure.embed-top.hide-smooth:hover figcaption,
figure.overlay.hide-smooth:hover figcaption,
figure.embed-over.hide-smooth:hover figcaption,
figure.hide-smooth:hover figcaption {
opacity: 0;
-webkit-transition: opacity .5s;
-moz-transition: opacity .5s;
-o-transition: opacity .5s;
transition: opacity .5s;
}
/* reveal */
figure.embed.reveal figcaption,
figure.embed-top.reveal figcaption,
figure.overlay.reveal figcaption,
figure.embed-over.reveal figcaption,
figure.reveal figcaption {
opacity: 0;
}
figure.embed.reveal:hover figcaption,
figure.embed-top.reveal:hover figcaption,
figure.overlay.reveal:hover figcaption,
figure.embed-over.reveal:hover figcaption,
figure.reveal:hover figcaption {
opacity: 1;
}
/* reveal-smooth */
figure.embed.reveal-smooth figcaption,
figure.embed-top.reveal-smooth figcaption,
figure.overlay.reveal-smooth figcaption,
figure.embed-over.reveal-smooth figcaption,
figure.reveal-smooth figcaption {
opacity: 0;
-webkit-transition: opacity .5s;
-moz-transition: opacity .5s;
-o-transition: opacity .5s;
transition: opacity .5s;
}
figure.embed.reveal-smooth:hover figcaption,
figure.embed-top.reveal-smooth:hover figcaption,
figure.overlay.reveal-smooth:hover figcaption,
figure.embed-over.reveal-smooth:hover figcaption,
figure.reveal-smooth:hover figcaption {
opacity: 1;
-webkit-transition: opacity .5s;
-moz-transition: opacity .5s;
-o-transition: opacity .5s;
transition: opacity .5s;
}