_s: Simplify gallery styles.

It consolidates the duplicate `.gallery` selectors, and removes image
styles that needlessly override their earlier defined styles.

Also switches to use inline-block over floats, and adds documentation
for caption styles, to be coherent with documentation for gallery
styles.
This commit is contained in:
Konstantin Obenland 2014-04-11 13:24:38 -07:00
parent adb609bfde
commit 4dd7a16f36
1 changed files with 18 additions and 21 deletions

View File

@ -42,7 +42,8 @@ and Blueprint http://www.blueprintcss.org/
10.3 - Comments
11.0 - Infinite scroll
12.0 - Media
12.1 - Galleries
12.1 - Captions
12.2 - Galleries
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@ -609,6 +610,16 @@ a:active {
margin-top: 0;
padding: 0;
}
/* Make sure embeds and iframes fit their containers */
embed,
iframe,
object {
max-width: 100%;
}
/*--------------------------------------------------------------
12.1 Captions
--------------------------------------------------------------*/
.wp-caption {
border: 1px solid #ccc;
margin-bottom: 1.5em;
@ -625,20 +636,17 @@ a:active {
.wp-caption .wp-caption-text {
margin: 0.8075em 0;
}
.site-main .gallery {
margin-bottom: 1.5em;
}
/*--------------------------------------------------------------
12.1 Galleries
12.2 Galleries
--------------------------------------------------------------*/
.gallery {
margin: auto auto 1.5em;
margin-bottom: 1.5em;
}
.gallery-item {
float: left;
display: inline-block;
text-align: center;
overflow: hidden;
position: relative;
vertical-align: top;
width: 100%;
}
.gallery-columns-2 .gallery-item {
@ -657,7 +665,7 @@ a:active {
max-width: 16.66%;
}
.gallery-columns-7 .gallery-item {
max-width: 14%;
max-width: 14.28%;
}
.gallery-columns-8 .gallery-item {
max-width: 12.5%;
@ -665,15 +673,4 @@ a:active {
.gallery-columns-9 .gallery-item {
max-width: 11.11%;
}
.gallery a img {
border: none;
height: auto;
max-width: 90%;
}
.gallery-caption {}
/* Make sure embeds and iframes fit their containers */
embed,
iframe,
object {
max-width: 100%;
}