<!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>[20010] trunk/wp-content/themes/twentytwelve: Twenty Twelve: better comment markup and styles, props drewstrojny.</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, #logmsg > ol { margin-left: 0; 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/20010">20010</a></dd>
<dt>Author</dt> <dd>lancewillett</dd>
<dt>Date</dt> <dd>2012-02-28 05:24:57 +0000 (Tue, 28 Feb 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Twenty Twelve: better comment markup and styles, props drewstrojny. See <a href="http://core.trac.wordpress.org/ticket/19978">#19978</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpcontentthemestwentytwelvecommentsphp">trunk/wp-content/themes/twentytwelve/comments.php</a></li>
<li><a href="#trunkwpcontentthemestwentytwelvefunctionsphp">trunk/wp-content/themes/twentytwelve/functions.php</a></li>
<li><a href="#trunkwpcontentthemestwentytwelvestylecss">trunk/wp-content/themes/twentytwelve/style.css</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpcontentthemestwentytwelvecommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentytwelve/comments.php (20009 => 20010)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentytwelve/comments.php        2012-02-28 05:19:50 UTC (rev 20009)
+++ trunk/wp-content/themes/twentytwelve/comments.php        2012-02-28 05:24:57 UTC (rev 20010)
</span><span class="lines">@@ -44,8 +44,8 @@
</span><span class="cx">                 &lt;?php endif; // check for comment navigation ?&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;ol class=&quot;commentlist&quot;&gt;
</span><del>-                        &lt;?php wp_list_comments( array( 'callback' =&gt; 'twentytwelve_comment' ) ); ?&gt;
-                &lt;/ol&gt;
</del><ins>+                        &lt;?php wp_list_comments( array( 'callback' =&gt; 'twentytwelve_comment', 'style' =&gt; 'ol' ) ); ?&gt;
+                &lt;/ol&gt;&lt;!-- .commentlist --&gt;
</ins><span class="cx"> 
</span><span class="cx">                 &lt;?php if ( get_comment_pages_count() &gt; 1 &amp;&amp; get_option( 'page_comments' ) ) : // are there comments to navigate through ?&gt;
</span><span class="cx">                 &lt;nav id=&quot;comment-nav-below&quot; role=&quot;navigation&quot;&gt;
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytwelvefunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentytwelve/functions.php (20009 => 20010)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentytwelve/functions.php        2012-02-28 05:19:50 UTC (rev 20009)
+++ trunk/wp-content/themes/twentytwelve/functions.php        2012-02-28 05:24:57 UTC (rev 20010)
</span><span class="lines">@@ -261,55 +261,47 @@
</span><span class="cx">         switch ( $comment-&gt;comment_type ) :
</span><span class="cx">                 case 'pingback' :
</span><span class="cx">                 case 'trackback' :
</span><ins>+                // Display trackbacks differently than normal comments.
</ins><span class="cx">         ?&gt;
</span><del>-        &lt;li class=&quot;post pingback&quot;&gt;
-                &lt;p&gt;&lt;?php _e( 'Pingback:', 'twentytwelve' ); ?&gt; &lt;?php comment_author_link(); ?&gt;&lt;?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '&lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;&lt;/p&gt;
</del><ins>+        &lt;li &lt;?php comment_class(); ?&gt; id=&quot;comment-&lt;?php comment_ID(); ?&gt;&quot;&gt;
+                &lt;p&gt;&lt;?php _e( 'Pingback:', 'twentytwelve' ); ?&gt; &lt;?php comment_author_link(); ?&gt; &lt;?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '&lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;&lt;/p&gt;
</ins><span class="cx">         &lt;?php
</span><span class="cx">                         break;
</span><span class="cx">                 default :
</span><ins>+                // Proceed with normal comments.
</ins><span class="cx">         ?&gt;
</span><span class="cx">         &lt;li &lt;?php comment_class(); ?&gt; id=&quot;li-comment-&lt;?php comment_ID(); ?&gt;&quot;&gt;
</span><span class="cx">                 &lt;article id=&quot;comment-&lt;?php comment_ID(); ?&gt;&quot; class=&quot;comment&quot;&gt;
</span><del>-                        &lt;footer class=&quot;comment-meta&quot;&gt;
-                                &lt;div class=&quot;comment-author vcard&quot;&gt;
-                                        &lt;?php
-                                                $avatar_size = 68;
-                                                if ( '0' != $comment-&gt;comment_parent )
-                                                        $avatar_size = 39;
</del><ins>+                        &lt;header class=&quot;comment-meta comment-author vcard&quot;&gt;
+                                &lt;?php
+                                        echo get_avatar( $comment, 44 );
</ins><span class="cx"> 
</span><del>-                                                echo get_avatar( $comment, $avatar_size );
</del><ins>+                                        printf( '&lt;cite class=&quot;fn&quot;&gt;%s&lt;/cite&gt;', get_comment_author_link() );
+                                        printf( '&lt;a href=&quot;%1$s&quot;&gt;&lt;time pubdate datetime=&quot;%2$s&quot;&gt;%3$s&lt;/time&gt;&lt;/a&gt;',
+                                                esc_url( get_comment_link( $comment-&gt;comment_ID ) ),
+                                                get_comment_time( 'c' ),
+                                                /* translators: 1: date, 2: time */
+                                                sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )
+                                        );
+                                ?&gt;
+                                &lt;?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '&lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
+                        &lt;/header&gt;
</ins><span class="cx"> 
</span><del>-                                                /* translators: 1: comment author, 2: date and time */
-                                                printf( __( '%1$s on %2$s &lt;span class=&quot;says&quot;&gt;said:&lt;/span&gt;', 'twentytwelve' ),
-                                                        sprintf( '&lt;span class=&quot;fn&quot;&gt;%s&lt;/span&gt;', get_comment_author_link() ),
-                                                        sprintf( '&lt;a href=&quot;%1$s&quot;&gt;&lt;time pubdate datetime=&quot;%2$s&quot;&gt;%3$s&lt;/time&gt;&lt;/a&gt;',
-                                                                esc_url( get_comment_link( $comment-&gt;comment_ID ) ),
-                                                                get_comment_time( 'c' ),
-                                                                /* translators: 1: date, 2: time */
-                                                                sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )
-                                                        )
-                                                );
-                                        ?&gt;
</del><ins>+                        &lt;?php if ( '0' == $comment-&gt;comment_approved ) : ?&gt;
+                                &lt;p class=&quot;comment-awaiting-moderation&quot;&gt;&lt;?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?&gt;&lt;/p&gt;
+                        &lt;?php endif; ?&gt;
</ins><span class="cx"> 
</span><del>-                                        &lt;?php edit_comment_link( __( 'Edit', 'twentytwelve' ), '&lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
-                                &lt;/div&gt;&lt;!-- .comment-author .vcard --&gt;
</del><ins>+                        &lt;section class=&quot;comment post-content&quot;&gt;
+                                &lt;?php comment_text(); ?&gt;
+                        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-                                &lt;?php if ( $comment-&gt;comment_approved == '0' ) : ?&gt;
-                                        &lt;em class=&quot;comment-awaiting-moderation&quot;&gt;&lt;?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?&gt;&lt;/em&gt;
-                                        &lt;br /&gt;
-                                &lt;?php endif; ?&gt;
-                        &lt;/footer&gt;
-
-                        &lt;div class=&quot;comment-content&quot;&gt;&lt;?php comment_text(); ?&gt;&lt;/div&gt;
-
</del><span class="cx">                         &lt;div class=&quot;reply&quot;&gt;
</span><span class="cx">                                 &lt;?php comment_reply_link( array_merge( $args, array( 'reply_text' =&gt; __( 'Reply &lt;span&gt;&amp;darr;&lt;/span&gt;', 'twentytwelve' ), 'depth' =&gt; $depth, 'max_depth' =&gt; $args['max_depth'] ) ) ); ?&gt;
</span><span class="cx">                         &lt;/div&gt;&lt;!-- .reply --&gt;
</span><span class="cx">                 &lt;/article&gt;&lt;!-- #comment-## --&gt;
</span><del>-
</del><span class="cx">         &lt;?php
</span><del>-                        break;
-        endswitch;
</del><ins>+                break;
+        endswitch; // end comment_type check
</ins><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytwelvestylecss"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentytwelve/style.css (20009 => 20010)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentytwelve/style.css        2012-02-28 05:19:50 UTC (rev 20009)
+++ trunk/wp-content/themes/twentytwelve/style.css        2012-02-28 05:24:57 UTC (rev 20010)
</span><span class="lines">@@ -558,6 +558,223 @@
</span><span class="cx">         max-width: 100%;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/* comments.css.scss
+ * Comment styling
+ * ------------------------------------------------------------------ */
+#comments-title {
+        margin-bottom: 48px;
+        margin-bottom: 3.428571429rem;
+        font-size: 16px;
+        font-size: 1.142857143rem;
+        line-height: 1.5;
+        font-weight: normal;
+}
+
+#comments article {
+        zoom: 1;
+        margin: 24px 0;
+        margin:  1.714285714rem 0;
+}
+#comments article:before, #comments article:after {
+        display: table;
+        content: &quot;&quot;;
+}
+#comments article:after {
+        clear: both;
+}
+#comments article header {
+        position: relative;
+        zoom: 1;
+        margin: 0 0 48px 0;
+        margin:  0 0 3.428571429rem 0;
+}
+#comments article header:before, #comments article header:after {
+        display: table;
+        content: &quot;&quot;;
+}
+#comments article header:after {
+        clear: both;
+}
+#comments article header img {
+        float: left;
+        padding: 0;
+        line-height: 0;
+}
+#comments article header cite,
+#comments article header time {
+        display: block;
+        margin-left: 85px;
+        margin-left: 6.071428571rem;
+}
+#comments article header cite {
+        font-style: normal;
+        font-size: 15px;
+        font-size: 1.071428571rem;
+        line-height: 1.6;
+}
+#comments article header time {
+        line-height: 1.714285714;
+        text-decoration: none;
+        font-size: 12px;
+        font-size: 0.857142857rem;
+        color: #5e5e5e;
+}
+#comments article header a {
+        text-decoration: none;
+        color: #5e5e5e;
+}
+#comments article header a:hover {
+        color: #13609e;
+}
+#comments article header cite a {
+        color: #444444;
+}
+#comments article header cite a:hover {
+        text-decoration: underline;
+}
+#comments article header h4 {
+        position: absolute;
+        top: 0;
+        right: 0;
+        padding: 6px 12px;
+        padding:  0.428571429rem 0.857142857rem;
+        font-size: 12px;
+        font-size: 0.857142857rem;
+        font-weight: normal;
+        color: #fff;
+        background-color: #0088d0;
+        background-repeat: repeat-x;
+        background-image: -khtml-gradient(linear, left top, left bottom, from(#009cee), to(#0088d0));
+        background-image: -moz-linear-gradient(top, #009cee, #0088d0);
+        background-image: -ms-linear-gradient(top, #009cee, #0088d0);
+        background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #009cee), color-stop(100%, #0088d0));
+        background-image: -webkit-linear-gradient(top, #009cee, #0088d0);
+        background-image: -o-linear-gradient(top, #009cee, #0088d0);
+        background-image: linear-gradient(top, #009cee, #0088d0);
+        -webkit-border-radius: 3px;
+        -moz-border-radius: 3px;
+        border-radius: 3px;
+        border: 1px solid #007cbd;
+}
+#comments article p {
+        margin: 24px 0;
+        margin:  1.714285714rem 0;
+        line-height: 1.714285714;
+}
+
+a.comment-reply-link {
+        font-size: 13px;
+        font-size: 0.928571429rem;
+        line-height: 1.846153846;
+        color: #686868;
+}
+a.comment-reply-link:hover {
+        color: #13609e;
+}
+
+/*---------------------------------------------------------
+Form
+------------------------------------------------------------ */
+#respond {
+        margin-top: 48px;
+        margin-top: 3.428571429rem;
+}
+#respond h3#reply-title {
+        font-size: 16px;
+        font-size: 1.142857143rem;
+        line-height: 1.5;
+}
+#respond h3#reply-title #cancel-comment-reply-link {
+        margin-left: 10px;
+        margin-left: 0.714285714rem;
+        font-weight: normal;
+        font-size: 12px;
+        font-size: 0.857142857rem;
+}
+#respond form {
+        margin: 24px 0;
+        margin:  1.714285714rem 0;
+}
+#respond form p {
+        zoom: 1;
+        margin: 11px 0;
+        margin:  0.785714286rem 0;
+}
+#respond form p:before, #respond form p:after {
+        display: table;
+        content: &quot;&quot;;
+}
+#respond form p:after {
+        clear: both;
+}
+#respond form p.logged-in-as {
+        margin-bottom: 24px;
+        margin-bottom: 1.714285714rem;
+}
+#respond form label {
+        display: block;
+        line-height: 1.714285714;
+}
+#respond form input[type=&quot;text&quot;],
+#respond form textarea {
+        font-family: inherit;
+        line-height: 1.714285714;
+        padding: 10px;
+        padding: 0.714285714rem;
+        border: 1px solid #d5d2ca;
+        -webkit-border-radius: 3px;
+        -moz-border-radius: 3px;
+        border-radius: 3px;
+        width: 96%;
+}
+@media screen and (min-width: 600px) {
+        #respond form input[type=&quot;text&quot;] {
+                width: 46.333333333%;
+        }
+        #respond form textarea.blog-textarea {
+                width: 79.666666667%;
+        }
+}
+#respond form p.form-allowed-tags {
+        margin: 0;
+        font-size: 12px;
+        font-size: 0.857142857rem;
+        line-height: 2;
+        color: #5e5e5e;
+}
+
+/* widgets.css.scss
+ * All widget styling
+ * ------------------------------------------------------------------ */
+#wp-calendar {
+        margin: 0;
+        width: 100%;
+        font-size: 13px;
+        font-size: 0.928571429rem;
+        line-height: 1.846153846;
+        color: #686868;
+}
+#wp-calendar th,
+#wp-calendar td,
+#wp-calendar caption {
+        text-align: left;
+}
+
+.widget_search label {
+        display: block;
+        font-size: 13px;
+        font-size: 0.928571429rem;
+        line-height: 1.846153846;
+}
+.widget_search input[type=&quot;text&quot;] {
+        padding: 6px;
+        padding: 0.428571429rem;
+        border: 1px solid #ccc;
+        -webkit-border-radius: 3px;
+        -moz-border-radius: 3px;
+        border-radius: 3px;
+}
+
</ins><span class="cx"> /* archive.css.scss
</span><span class="cx">  * Styling for the archive view
</span><span class="cx">  * ------------------------------------------------------------------ */
</span></span></pre>
</div>
</div>

</body>
</html>