From 5a7f9c48b1f464a357b0ec030be7e9da46256b39 Mon Sep 17 00:00:00 2001 From: "David A. Kennedy" Date: Wed, 25 Oct 2017 02:16:39 +0000 Subject: [PATCH] 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 --- src/wp-content/themes/twentyeleven/style.css | 14 +++++++ .../themes/twentyfourteen/style.css | 20 +++++++++- .../themes/twentyseventeen/style.css | 12 +++++- src/wp-content/themes/twentyten/style.css | 14 +++++++ .../themes/twentythirteen/style.css | 37 ++++++++++++++++++- src/wp-content/themes/twentytwelve/style.css | 12 ++++++ 6 files changed, 104 insertions(+), 5 deletions(-) diff --git a/src/wp-content/themes/twentyeleven/style.css b/src/wp-content/themes/twentyeleven/style.css index 2be3a03d72..154d9c6ed1 100644 --- a/src/wp-content/themes/twentyeleven/style.css +++ b/src/wp-content/themes/twentyeleven/style.css @@ -1971,6 +1971,20 @@ section.ephemera .entry-title a span { 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 ----------------------------------------------- */ diff --git a/src/wp-content/themes/twentyfourteen/style.css b/src/wp-content/themes/twentyfourteen/style.css index 5f53425169..acf9233cbb 100644 --- a/src/wp-content/themes/twentyfourteen/style.css +++ b/src/wp-content/themes/twentyfourteen/style.css @@ -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-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-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; } @@ -1651,7 +1659,15 @@ a.post-thumbnail:hover { .gallery-columns-7 .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; } diff --git a/src/wp-content/themes/twentyseventeen/style.css b/src/wp-content/themes/twentyseventeen/style.css index cd526107bf..1d650470d1 100644 --- a/src/wp-content/themes/twentyseventeen/style.css +++ b/src/wp-content/themes/twentyseventeen/style.css @@ -2582,7 +2582,7 @@ h2.widget-title { padding-top: 1em; } -/* widget markup */ +/* Widget markup */ .widget .post-date, .widget .rss-date { @@ -2786,6 +2786,16 @@ h2.widget-title { 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 --------------------------------------------------------------*/ diff --git a/src/wp-content/themes/twentyten/style.css b/src/wp-content/themes/twentyten/style.css index 66d6bac69c..1f374f5f73 100644 --- a/src/wp-content/themes/twentyten/style.css +++ b/src/wp-content/themes/twentyten/style.css @@ -1246,6 +1246,20 @@ h3#reply-title { 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 .widget-area ul { margin-left: 0; diff --git a/src/wp-content/themes/twentythirteen/style.css b/src/wp-content/themes/twentythirteen/style.css index c46f809125..1e44243806 100644 --- a/src/wp-content/themes/twentythirteen/style.css +++ b/src/wp-content/themes/twentythirteen/style.css @@ -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-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-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; } @@ -1385,7 +1393,15 @@ footer.entry-meta { .gallery-columns-7 .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; } @@ -2595,6 +2611,23 @@ footer.entry-meta { 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 * ---------------------------------------------------------------------------- diff --git a/src/wp-content/themes/twentytwelve/style.css b/src/wp-content/themes/twentytwelve/style.css index 4e559ac279..e7eb66a4e7 100644 --- a/src/wp-content/themes/twentytwelve/style.css +++ b/src/wp-content/themes/twentytwelve/style.css @@ -1465,6 +1465,18 @@ a.comment-edit-link:hover { 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 ----------------------------------------------- */