<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[24720] trunk/wp-content/themes/twentythirteen: Twenty Thirteen: improve gallery styles to ensure both single and index views are displayed consistently.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/24720">24720</a></dd>
<dt>Author</dt> <dd>lancewillett</dd>
<dt>Date</dt> <dd>2013-07-17 04:51:06 +0000 (Wed, 17 Jul 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Twenty Thirteen: improve gallery styles to ensure both single and index views are displayed consistently. Closes <a href="http://core.trac.wordpress.org/ticket/24555">#24555</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpcontentthemestwentythirteenfunctionsphp">trunk/wp-content/themes/twentythirteen/functions.php</a></li>
<li><a href="#trunkwpcontentthemestwentythirteenrtlcss">trunk/wp-content/themes/twentythirteen/rtl.css</a></li>
<li><a href="#trunkwpcontentthemestwentythirteenstylecss">trunk/wp-content/themes/twentythirteen/style.css</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpcontentthemestwentythirteenfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentythirteen/functions.php (24719 => 24720)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentythirteen/functions.php 2013-07-17 04:46:09 UTC (rev 24719)
+++ trunk/wp-content/themes/twentythirteen/functions.php 2013-07-17 04:51:06 UTC (rev 24720)
</span><span class="lines">@@ -501,22 +501,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Sets the image size in featured galleries to large.
- *
- * @since Twenty Thirteen 1.0
- *
- * @param array $atts Combined and filtered attribute list.
- * @return array The filtered attribute list.
- */
-function twentythirteen_gallery_atts( $atts ) {
- if ( has_post_format( 'gallery' ) && ! is_single() )
- $atts['size'] = wp_is_mobile() ? 'thumbnail' : 'medium';
-
- return $atts;
-}
-add_filter( 'shortcode_atts_gallery', 'twentythirteen_gallery_atts' );
-
-/**
</del><span class="cx"> * Extends the default WordPress body classes.
</span><span class="cx"> *
</span><span class="cx"> * Adds body classes to denote:
</span></span></pre></div>
<a id="trunkwpcontentthemestwentythirteenrtlcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentythirteen/rtl.css (24719 => 24720)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentythirteen/rtl.css 2013-07-17 04:46:09 UTC (rev 24719)
+++ trunk/wp-content/themes/twentythirteen/rtl.css 2013-07-17 04:51:06 UTC (rev 24720)
</span><span class="lines">@@ -261,19 +261,6 @@
</span><span class="cx"> margin-right: auto;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.blog .format-gallery .gallery-item,
-.archive .format-gallery .gallery-item,
-.search .format-gallery .gallery-item {
- margin-left: 4px;
- margin-right: auto;
-}
-.blog .format-gallery .gallery-item img,
-.archive .format-gallery .gallery-item img,
-.search .format-gallery .gallery-item img {
- position: absolute;
- left: 0;
-}
-
</del><span class="cx"> .format-image .wp-caption-text {
</span><span class="cx"> text-align: right;
</span><span class="cx"> }
</span><span class="lines">@@ -726,7 +713,7 @@
</span><span class="cx"> padding-right: 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- .single .gallery-columns-3 .gallery-item:nth-of-type(3n) {
</del><ins>+ .gallery-columns-3 .gallery-item:nth-of-type(3n) {
</ins><span class="cx"> margin-left: 4px;
</span><span class="cx"> margin-right: auto;
</span><span class="cx"> }
</span><span class="lines">@@ -738,12 +725,13 @@
</span><span class="cx"> margin-right: 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ .gallery .gallery-item:nth-of-type(even) {
+ margin-left: 0;
+ margin-right: auto;
+ }
+
</ins><span class="cx"> .gallery .gallery-item,
</span><del>- .single .gallery-columns-2.gallery-size-thumbnail .gallery-item,
- .blog .format-gallery .gallery-item,
- .archive .format-gallery .gallery-item,
- .search .format-gallery .gallery-item,
- .single .gallery.gallery-columns-3 .gallery-item:nth-of-type(even),
</del><ins>+ .gallery.gallery-columns-3 .gallery-item:nth-of-type(even),
</ins><span class="cx"> .gallery-columns-3 .gallery-item:nth-of-type(3n),
</span><span class="cx"> .gallery-columns-5 .gallery-item:nth-of-type(5n),
</span><span class="cx"> .gallery-columns-7 .gallery-item:nth-of-type(7n),
</span><span class="lines">@@ -752,14 +740,6 @@
</span><span class="cx"> margin-right: auto;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- .blog .format-gallery .gallery-item:nth-of-type(odd),
- .archive .format-gallery .gallery-item:nth-of-type(odd),
- .search .format-gallery .gallery-item:nth-of-type(odd),
- .single .gallery .gallery-item:nth-of-type(even) {
- margin-left: 0;
- margin-right: auto;
- }
-
</del><span class="cx"> .comment-author .avatar {
</span><span class="cx"> margin-left: 5px;
</span><span class="cx"> margin-right: auto;
</span></span></pre></div>
<a id="trunkwpcontentthemestwentythirteenstylecss"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentythirteen/style.css (24719 => 24720)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentythirteen/style.css 2013-07-17 04:46:09 UTC (rev 24719)
+++ trunk/wp-content/themes/twentythirteen/style.css 2013-07-17 04:51:06 UTC (rev 24720)
</span><span class="lines">@@ -1232,21 +1232,9 @@
</span><span class="cx"> margin: 0 auto 20px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.gallery-columns-1 .gallery-item {
- max-width: 100%;
-}
-
-.gallery-columns-2 .gallery-item {
- max-width: 48%;
- max-width: -webkit-calc(50% - 4px);
- max-width: calc(50% - 4px);
- text-align: center;
-}
-
</del><ins>+.gallery-columns-1 .gallery-item,
+.gallery-columns-2 .gallery-item,
</ins><span class="cx"> .gallery-columns-3 .gallery-item {
</span><del>- max-width: 31%;
- max-width: -webkit-calc(33.3% - 4px);
- max-width: calc(33.3% - 4px);
</del><span class="cx"> text-align: center;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1481,89 +1469,6 @@
</span><span class="cx"> color: #722d19;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-/* Blog gallery */
-.blog .format-gallery .gallery,
-.archive .format-gallery .gallery,
-.search .format-gallery .gallery {
- margin-bottom: 20px;
- margin-left: -4px;
- max-width: 608px;
-}
-
-.blog .format-gallery .gallery-item,
-.archive .format-gallery .gallery-item,
-.search .format-gallery .gallery-item {
- display: block;
- height: 148px;
- margin-right: 4px;
- max-height: 100%;
- max-width: 100%;
- overflow: hidden;
- width: 148px;
-}
-
-.blog .format-gallery .gallery-item img,
-.archive .format-gallery .gallery-item img,
-.search .format-gallery .gallery-item img {
- height: 100%;
- max-height: 148px;
- max-width: none;
- width: auto;
-}
-
-.blog .format-gallery .gallery-item .portrait img,
-.archive .format-gallery .gallery-item .portrait img,
-.search .format-gallery .gallery-item .portrait img {
- height: auto;
- max-height: none;
- max-width: 148px;
- width: 100%;
-}
-
-.blog .format-gallery .gallery-item:first-child,
-.archive .format-gallery .gallery-item:first-child,
-.search .format-gallery .gallery-item:first-child {
- height: 300px;
- width: 300px;
-}
-
-.blog .format-gallery .gallery-item:first-child img,
-.archive .format-gallery .gallery-item:first-child img,
-.search .format-gallery .gallery-item:first-child img {
- max-height: 300px;
-}
-
-.blog .format-gallery .gallery-item:first-child .portrait img,
-.archive .format-gallery .gallery-item:first-child .portrait img,
-.search .format-gallery .gallery-item:first-child .portrait img {
- max-height: none;
- max-width: 300px;
-}
-
-.blog .format-gallery .gallery-item .gallery-icon,
-.archive .format-gallery .gallery-item .gallery-icon,
-.search .format-gallery .gallery-item .gallery-icon {
- height: 100%;
- -webkit-transform: translate(50%, 50%);
- -ms-transform: translate(50%, 50%);
- transform: translate(50%, 50%);
- width: 100%;
-}
-
-.blog .format-gallery .gallery-item .gallery-icon img,
-.archive .format-gallery .gallery-item .gallery-icon img,
-.search .format-gallery .gallery-item .gallery-icon img {
- -webkit-transform: translate(-50%, -50%);
- -ms-transform: translate(-50%, -50%);
- transform: translate(-50%, -50%);
-}
-
-.blog .format-gallery .gallery br,
-.archive .format-gallery .gallery br,
-.search .format-gallery .gallery br {
- display: none;
-}
-
</del><span class="cx"> /* Image */
</span><span class="cx"> .format-image .entry-title {
</span><span class="cx"> font-size: 28px;
</span><span class="lines">@@ -3012,29 +2917,23 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .gallery .gallery-item,
</span><del>- .single .gallery-columns-2.gallery-size-thumbnail .gallery-item,
- .blog .format-gallery .gallery-item,
- .archive .format-gallery .gallery-item,
- .search .format-gallery .gallery-item {
</del><ins>+ .gallery-columns-2.gallery-size-thumbnail .gallery-item {
</ins><span class="cx"> max-width: none;
</span><span class="cx"> width: 49%;
</span><span class="cx"> width: -webkit-calc(50% - 4px);
</span><span class="cx"> width: calc(50% - 4px);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- .single .gallery-columns-1.gallery-size-medium,
- .single .gallery-columns-1.gallery-size-thumbnail,
- .single .gallery-columns-2.gallery-size-thumbnail,
- .single .gallery-columns-3.gallery-size-thumbnail {
</del><ins>+ .gallery-columns-1.gallery-size-medium,
+ .gallery-columns-1.gallery-size-thumbnail,
+ .gallery-columns-2.gallery-size-thumbnail,
+ .gallery-columns-3.gallery-size-thumbnail {
</ins><span class="cx"> display: block;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .gallery-columns-1 .gallery-item,
</span><del>- .single .gallery-columns-1.gallery-size-medium .gallery-item,
- .single .gallery-columns-1.gallery-size-thumbnail .gallery-item,
- .blog .format-gallery .gallery-item:first-child,
- .archive .format-gallery .gallery-item:first-child,
- .search .format-gallery .gallery-item:first-child {
</del><ins>+ .gallery-columns-1.gallery-size-medium .gallery-item,
+ .gallery-columns-1.gallery-size-thumbnail .gallery-item {
</ins><span class="cx"> text-align: center;
</span><span class="cx"> width: 98%;
</span><span class="cx"> width: -webkit-calc(100% - 4px);
</span><span class="lines">@@ -3052,10 +2951,7 @@
</span><span class="cx"> display: none;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- .blog .format-gallery .gallery-item:nth-of-type(odd),
- .archive .format-gallery .gallery-item:nth-of-type(odd),
- .search .format-gallery .gallery-item:nth-of-type(odd),
- .single .gallery .gallery-item:nth-of-type(even) {
</del><ins>+ .gallery .gallery-item:nth-of-type(even) {
</ins><span class="cx"> margin-right: 0;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>