Bundled Themes: Make sure new gallery widgets look good in themes

Twenty Ten: Reduces image size and removes image borders for galleries in widget areas.
Twenty Eleven: Reduces image size and removes image borders for galleries in widget areas.
Twenty Twelve: Reduces image size for some gallery sizes in widget areas.
Twenty Thirteen: Ensure proper clearing for images, hide captions for some gallery column combos and ensure good display for galleries in widget areas.
Twenty Fourteen: Ensure proper clearing for images and hide captions for some gallery column combos for galleries in widget areas.
Twenty Seventeen: Hide captions for some gallery column combos for galleries in widget areas.

Props joyously, williampatton, davidakennedy, melchoyce, crunnells.

Fixes #41969.


git-svn-id: https://develop.svn.wordpress.org/trunk@42019 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
David A. Kennedy 2017-10-25 02:16:39 +00:00
parent 273e0e8ecc
commit 5a7f9c48b1
6 changed files with 104 additions and 5 deletions

View File

@ -1971,6 +1971,20 @@ section.ephemera .entry-title a span {
display: inline-block; display: inline-block;
} }
/* Helps galleries in widget areas look presentable in most cases. */
#page .widget-area .gallery-columns-2 img,
#page .widget-area .gallery-columns-3 img,
#page .widget-area .gallery-columns-4 img,
#page .widget-area .gallery-columns-5 img,
#page .widget-area .gallery-columns-6 img,
#page .widget-area .gallery-columns-7 img,
#page .widget-area .gallery-columns-8 img,
#page .widget-area .gallery-columns-9 img {
border: none;
max-width: 90%;
width: auto;
}
/* =Comments /* =Comments
----------------------------------------------- */ ----------------------------------------------- */

View File

@ -1612,7 +1612,15 @@ a.post-thumbnail:hover {
.gallery-columns-1.gallery-size-medium figure.gallery-item:nth-of-type(1n+1), .gallery-columns-1.gallery-size-medium figure.gallery-item:nth-of-type(1n+1),
.gallery-columns-1.gallery-size-thumbnail figure.gallery-item:nth-of-type(1n+1), .gallery-columns-1.gallery-size-thumbnail figure.gallery-item:nth-of-type(1n+1),
.gallery-columns-2.gallery-size-thumbnail figure.gallery-item:nth-of-type(2n+1), .gallery-columns-2.gallery-size-thumbnail figure.gallery-item:nth-of-type(2n+1),
.gallery-columns-3.gallery-size-thumbnail figure.gallery-item:nth-of-type(3n+1) { .gallery-columns-3.gallery-size-thumbnail figure.gallery-item:nth-of-type(3n+1),
.widget-area .gallery-columns-2 figure.gallery-item:nth-of-type(2n+1),
.widget-area .gallery-columns-3 figure.gallery-item:nth-of-type(3n+1),
.widget-area .gallery-columns-4 figure.gallery-item:nth-of-type(4n+1),
.widget-area .gallery-columns-5 figure.gallery-item:nth-of-type(5n+1),
.widget-area .gallery-columns-6 figure.gallery-item:nth-of-type(6n+1),
.widget-area .gallery-columns-7 figure.gallery-item:nth-of-type(7n+1),
.widget-area .gallery-columns-8 figure.gallery-item:nth-of-type(8n+1),
.widget-area .gallery-columns-9 figure.gallery-item:nth-of-type(9n+1) {
clear: left; clear: left;
} }
@ -1651,7 +1659,15 @@ a.post-thumbnail:hover {
.gallery-columns-7 .gallery-caption, .gallery-columns-7 .gallery-caption,
.gallery-columns-8 .gallery-caption, .gallery-columns-8 .gallery-caption,
.gallery-columns-9 .gallery-caption { .gallery-columns-9 .gallery-caption,
.widget-area .gallery-columns-2 .gallery-caption,
.widget-area .gallery-columns-3 .gallery-caption,
.widget-area .gallery-columns-4 .gallery-caption,
.widget-area .gallery-columns-5 .gallery-caption,
.widget-area .gallery-columns-6 .gallery-caption,
.widget-area .gallery-columns-7 .gallery-caption,
.widget-area .gallery-columns-8 .gallery-caption,
.widget-area .gallery-columns-9 .gallery-caption {
display: none; display: none;
} }

View File

@ -2582,7 +2582,7 @@ h2.widget-title {
padding-top: 1em; padding-top: 1em;
} }
/* widget markup */ /* Widget markup */
.widget .post-date, .widget .post-date,
.widget .rss-date { .widget .rss-date {
@ -2786,6 +2786,16 @@ h2.widget-title {
border: 0; border: 0;
} }
/* Gallery widget */
.gallery-columns-5 .gallery-caption,
.gallery-columns-6 .gallery-caption,
.gallery-columns-7 .gallery-caption,
.gallery-columns-8 .gallery-caption,
.gallery-columns-9 .gallery-caption {
display: none;
}
/*-------------------------------------------------------------- /*--------------------------------------------------------------
16.0 Media 16.0 Media
--------------------------------------------------------------*/ --------------------------------------------------------------*/

View File

@ -1246,6 +1246,20 @@ h3#reply-title {
display: inline-block; display: inline-block;
} }
/* Helps galleries in widget areas look presentable in most cases. */
.widget-area .gallery-columns-2 img,
.widget-area .gallery-columns-3 img,
.widget-area .gallery-columns-4 img,
.widget-area .gallery-columns-5 img,
.widget-area .gallery-columns-6 img,
.widget-area .gallery-columns-7 img,
.widget-area .gallery-columns-8 img,
.widget-area .gallery-columns-9 img {
border: none;
max-width: 90%;
width: auto;
}
/* Main sidebars */ /* Main sidebars */
#main .widget-area ul { #main .widget-area ul {
margin-left: 0; margin-left: 0;

View File

@ -1345,7 +1345,15 @@ footer.entry-meta {
.gallery-columns-1.gallery-size-medium figure.gallery-item:nth-of-type(1n+1), .gallery-columns-1.gallery-size-medium figure.gallery-item:nth-of-type(1n+1),
.gallery-columns-1.gallery-size-thumbnail figure.gallery-item:nth-of-type(1n+1), .gallery-columns-1.gallery-size-thumbnail figure.gallery-item:nth-of-type(1n+1),
.gallery-columns-2.gallery-size-thumbnail figure.gallery-item:nth-of-type(2n+1), .gallery-columns-2.gallery-size-thumbnail figure.gallery-item:nth-of-type(2n+1),
.gallery-columns-3.gallery-size-thumbnail figure.gallery-item:nth-of-type(3n+1) { .gallery-columns-3.gallery-size-thumbnail figure.gallery-item:nth-of-type(3n+1),
.widget-area .gallery-columns-2 figure.gallery-item:nth-of-type(2n+1),
.widget-area .gallery-columns-3 figure.gallery-item:nth-of-type(3n+1),
.widget-area .gallery-columns-4 figure.gallery-item:nth-of-type(4n+1),
.widget-area .gallery-columns-5 figure.gallery-item:nth-of-type(5n+1),
.widget-area .gallery-columns-6 figure.gallery-item:nth-of-type(6n+1),
.widget-area .gallery-columns-7 figure.gallery-item:nth-of-type(7n+1),
.widget-area .gallery-columns-8 figure.gallery-item:nth-of-type(8n+1),
.widget-area .gallery-columns-9 figure.gallery-item:nth-of-type(9n+1) {
clear: left; clear: left;
} }
@ -1385,7 +1393,15 @@ footer.entry-meta {
.gallery-columns-7 .gallery-caption, .gallery-columns-7 .gallery-caption,
.gallery-columns-8 .gallery-caption, .gallery-columns-8 .gallery-caption,
.gallery-columns-9 .gallery-caption { .gallery-columns-9 .gallery-caption,
.widget-area .gallery-columns-2 .gallery-caption,
.widget-area .gallery-columns-3 .gallery-caption,
.widget-area .gallery-columns-4 .gallery-caption,
.widget-area .gallery-columns-5 .gallery-caption,
.widget-area .gallery-columns-6 .gallery-caption,
.widget-area .gallery-columns-7 .gallery-caption,
.widget-area .gallery-columns-8 .gallery-caption,
.widget-area .gallery-columns-9 .gallery-caption {
display: none; display: none;
} }
@ -2595,6 +2611,23 @@ footer.entry-meta {
padding: 0; padding: 0;
} }
/* Gallery Widget */
.widget .gallery-columns-1 .gallery-item {
max-width: 100%;
}
.widget .gallery-columns-2 .gallery-item {
max-width: 49%;
max-width: -webkit-calc(50% - 4px);
max-width: calc(50% - 4px);
}
.widget .gallery-columns-3 .gallery-item {
max-width: 22%;
max-width: -webkit-calc(33% - 4px);
max-width: calc(33% - 4px);
}
/** /**
* 7.0 Footer * 7.0 Footer
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------

View File

@ -1465,6 +1465,18 @@ a.comment-edit-link:hover {
margin: 0; margin: 0;
} }
.widget-area .gallery-columns-2.gallery-size-full .gallery-icon img,
.widget-area .gallery-columns-3.gallery-size-full .gallery-icon img,
.widget-area .gallery-columns-4.gallery-size-full .gallery-icon img,
.widget-area .gallery-columns-5.gallery-size-full .gallery-icon img,
.widget-area .gallery-columns-6 .gallery-icon img,
.widget-area .gallery-columns-7 .gallery-icon img,
.widget-area .gallery-columns-8 .gallery-icon img,
.widget-area .gallery-columns-9 .gallery-icon img {
height: auto;
max-width: 80%;
}
/* =Plugins /* =Plugins
----------------------------------------------- */ ----------------------------------------------- */