Merge pull request #458 from Automattic/pr/429

Updated gallery styles to work for both HTML4 and HTML5 versions.

Fixes #425.
Closes #429.
This commit is contained in:
Konstantin Obenland 2014-04-14 12:00:56 -07:00
commit 2d2f66f9a1
1 changed files with 42 additions and 16 deletions

View File

@ -42,6 +42,8 @@ and Blueprint http://www.blueprintcss.org/
10.3 - Comments 10.3 - Comments
11.0 - Infinite scroll 11.0 - Infinite scroll
12.0 - Media 12.0 - Media
12.1 - Captions
12.2 - Galleries
--------------------------------------------------------------*/ --------------------------------------------------------------*/
/*-------------------------------------------------------------- /*--------------------------------------------------------------
@ -608,6 +610,16 @@ a:active {
margin-top: 0; margin-top: 0;
padding: 0; padding: 0;
} }
/* Make sure embeds and iframes fit their containers */
embed,
iframe,
object {
max-width: 100%;
}
/*--------------------------------------------------------------
12.1 Captions
--------------------------------------------------------------*/
.wp-caption { .wp-caption {
border: 1px solid #ccc; border: 1px solid #ccc;
margin-bottom: 1.5em; margin-bottom: 1.5em;
@ -624,27 +636,41 @@ a:active {
.wp-caption .wp-caption-text { .wp-caption .wp-caption-text {
margin: 0.8075em 0; margin: 0.8075em 0;
} }
.site-main .gallery {
/*--------------------------------------------------------------
12.2 Galleries
--------------------------------------------------------------*/
.gallery {
margin-bottom: 1.5em; margin-bottom: 1.5em;
} }
.gallery-caption { .gallery-item {
display: inline-block;
text-align: center;
vertical-align: top;
width: 100%;
} }
.site-main .gallery a img { .gallery-columns-2 .gallery-item {
border: none; max-width: 50%;
height: auto;
max-width: 90%;
} }
.site-main .gallery dd, .gallery-columns-3 .gallery-item {
.site-main .gallery figcaption { max-width: 33.33%;
margin: 0;
} }
.site-main .gallery-columns-4 .gallery-item { .gallery-columns-4 .gallery-item {
max-width: 25%;
} }
.site-main .gallery-columns-4 .gallery-item img { .gallery-columns-5 .gallery-item {
max-width: 20%;
} }
/* Make sure embeds and iframes fit their containers */ .gallery-columns-6 .gallery-item {
embed, max-width: 16.66%;
iframe,
object {
max-width: 100%;
} }
.gallery-columns-7 .gallery-item {
max-width: 14.28%;
}
.gallery-columns-8 .gallery-item {
max-width: 12.5%;
}
.gallery-columns-9 .gallery-item {
max-width: 11.11%;
}
.gallery-caption {}