Make WordPress Core

Ticket #23584: 23584.5.diff​

File 23584.5.diff​, 1.1 KB (added by obenland, 11 years ago)

Hidden captions, visible on hover, preserving image margins.

Line 
1Index: wp-content/themes/twentythirteen/style.css
2===================================================================
3--- wp-content/themes/twentythirteen/style.css  (revision 23615)
4+++ wp-content/themes/twentythirteen/style.css  (working copy)
5@@ -738,7 +738,8 @@
6 }
7 
8 .wp-caption .wp-caption-text,
9-.entry-caption {
10+.entry-caption,
11+.gallery-caption {
12        color: #220e10;
13        font-size: 18px;
14        font-style: italic;
15@@ -1244,6 +1245,8 @@
16 .gallery-item {
17        float: left;
18        margin: 0 4px 4px 0;
19+       overflow: hidden;
20+       position: relative;
21 }
22 
23 .single .gallery-columns-1.gallery-size-medium,
24@@ -1328,14 +1331,22 @@
25 }
26 
27 .gallery-caption {
28-       color: #777;
29-       font-size: 14px;
30-       font-style: italic;
31-       padding-top: 4px;
32+       background-color: rgba(255, 255, 255, 0.8);
33+       margin: 0;
34+       overflow: hidden;
35+       padding: 2px 10px;
36+       position: absolute;
37+       bottom: -40px;
38+       text-align: left;
39+       text-overflow: ellipsis;
40+       -webkit-transition: bottom 400ms ease;
41+       transition:         bottom 400ms ease;
42+       white-space: nowrap;
43+       width: 100%;
44 }
45 
46-.gallery-caption {
47-       width: 90%;
48+.gallery-item:hover .gallery-caption {
49+       bottom: 0;
50 }
51 
52