<!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>[23672] trunk/wp-content/themes/twentythirteen: Twenty Thirteen: first pass at editor styles.</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/23672">23672</a></dd>
<dt>Author</dt> <dd>lancewillett</dd>
<dt>Date</dt> <dd>2013-03-12 17:27:24 +0000 (Tue, 12 Mar 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Twenty Thirteen: first pass at editor styles. Props Frank Klein and obenland. See <a href="http://core.trac.wordpress.org/ticket/23551">#23551</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpcontentthemestwentythirteencsseditorstylecss">trunk/wp-content/themes/twentythirteen/css/editor-style.css</a></li>
<li><a href="#trunkwpcontentthemestwentythirteenfunctionsphp">trunk/wp-content/themes/twentythirteen/functions.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpcontentthemestwentythirteencsseditorstylecss"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentythirteen/css/editor-style.css (23671 => 23672)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentythirteen/css/editor-style.css        2013-03-12 16:59:38 UTC (rev 23671)
+++ trunk/wp-content/themes/twentythirteen/css/editor-style.css        2013-03-12 17:27:24 UTC (rev 23672)
</span><span class="lines">@@ -3,4 +3,350 @@
</span><span class="cx"> Description: Used to style the TinyMCE editor.
</span><span class="cx"> */
</span><span class="cx"> 
</span><del>-/* TODO */
</del><span class="cx">\ No newline at end of file
</span><ins>+html .mceContentBody {
+        font-size: 100%;
+        max-width: 604px;
+}
+
+body {
+        font-family: &quot;Source Sans Pro&quot;, Helvetica, sans-serif;
+        -webkit-hyphens: auto;
+        -moz-hyphens:    auto;
+        -ms-hyphens:     auto;
+        hyphens: auto;
+        color: #141412;
+        line-height: 1.5;
+        text-rendering: optimizeLegibility;
+        vertical-align: baseline;
+}
+
+
+/**
+ * Headings
+ * ----------------------------------------------------------------------------
+ */
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+        clear: both;
+        font-family: Bitter, Georgia, serif;
+        line-height: 1.3;
+}
+
+h1 {
+        font-size: 48px;
+        margin: 33px 0;
+}
+
+h2 {
+        font-size: 30px;
+        margin: 25px 0;
+}
+
+h3 {
+        font-size: 22px;
+        margin: 22px 0;
+}
+
+h4 {
+        font-size: 20px;
+        margin: 25px 0;
+}
+
+h5 {
+        font-size: 18px;
+        margin: 30px 0;
+}
+
+h6 {
+        font-size: 16px;
+        margin: 36px 0;
+}
+
+hr {
+        background: url(../images/dotted-line.png) repeat center top;
+        background-size: 4px 4px;
+        border: 0;
+        height: 1px;
+        margin: 0 0 24px;
+}
+
+
+/**
+ * Text elements
+ * ----------------------------------------------------------------------------
+ */
+
+p {
+        margin: 0 0 24px;
+}
+
+ol,
+ul {
+        margin: 16px 0;
+        padding: 0 0 0 40px;
+}
+
+ul {
+        list-style-type: square;
+}
+
+ol {
+        list-style: decimal outside;
+}
+
+li &gt; ul,
+li &gt; ol {
+        margin: 0;
+}
+
+dl {
+        margin: 0 20px;
+}
+
+dt {
+        font-weight: bold;
+}
+
+dd {
+        margin: 0 0 20px;
+}
+
+strong {
+        font-weight: bold;
+}
+
+code,
+kbd,
+pre,
+samp {
+        font-family: monospace, serif;
+        font-size: 14px;
+        -webkit-hyphens: auto;
+        -moz-hyphens:    auto;
+        -ms-hyphens:     auto;
+        hyphens: none;
+}
+
+pre {
+        background: #f5f5f5;
+        color: #666;
+        font-family: monospace;
+        font-size: 14px;
+        margin: 20px 0;
+        overflow: auto;
+        padding: 20px;
+        white-space: pre;
+        white-space: pre-wrap;
+        word-wrap: break-word;
+}
+
+blockquote,
+q {
+        -webkit-hyphens: auto;
+        -moz-hyphens:    auto;
+        -ms-hyphens:     auto;
+        hyphens: none;
+        quotes: none;
+}
+
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+        content: &quot;&quot;;
+        content: none;
+}
+
+blockquote {
+        font-size: 24px;
+        font-style: italic;
+        font-weight: 300;
+        margin: 24px 40px;
+}
+
+blockquote blockquote {
+        margin-right: 0;
+}
+
+blockquote cite,
+blockquote small {
+        font-size: 14px;
+        font-weight: normal;
+        text-transform: uppercase;
+}
+
+cite {
+        border-bottom: 0;
+}
+
+abbr[title] {
+        border-bottom: 1px dotted;
+}
+
+address {
+        font-style: italic;
+        margin: 0 0 24px;
+}
+
+del {
+        color: #333;
+}
+
+ins {
+        background: #fff9c0;
+        border: none;
+        color: #333;
+        text-decoration: none;
+}
+
+sub,
+sup {
+        font-size: 75%;
+        line-height: 0;
+        position: relative;
+        vertical-align: baseline;
+}
+
+sup {
+        top: -0.5em;
+}
+
+sub {
+        bottom: -0.25em;
+}
+
+
+/**
+ * Links
+ * ----------------------------------------------------------------------------
+ */
+
+a {
+        color: #ca3c08;
+        text-decoration: none;
+}
+
+a:visited {
+        color: #ac0404;
+}
+
+a:focus {
+        outline: thin dotted;
+}
+
+a:active,
+a:hover {
+        color: #ea9629;
+        outline: 0;
+}
+
+a:hover {
+        text-decoration: underline;
+}
+
+
+/**
+ * Alignment
+ * ----------------------------------------------------------------------------
+ */
+
+.alignleft {
+        float: left;
+        margin: 5px 20px 5px 0;
+}
+
+.alignright {
+        float: right;
+        margin: 5px 0 5px 20px;
+}
+
+.aligncenter {
+        display: block;
+        margin: 5px auto;
+}
+
+
+/**
+ * Tables
+ * ----------------------------------------------------------------------------
+ */
+
+table {
+        border-bottom: 1px solid #ededed;
+        border-collapse: collapse;
+        border-spacing: 0;
+        font-size: 14px;
+        line-height: 2;
+        margin: 0 0 20px;
+        width: 100%;
+}
+
+caption,
+th,
+td {
+        font-weight: normal;
+        text-align: left;
+}
+
+caption {
+        font-size: 16px;
+        margin: 20px 0;
+}
+
+th {
+        font-weight: bold;
+        text-transform: uppercase;
+}
+
+td {
+        border-top: 1px solid #ededed;
+        padding: 6px 10px 6px 0;
+}
+
+
+/**
+ * Images
+ * ----------------------------------------------------------------------------
+ */
+
+img {
+        height: auto;
+        max-width: 100%;
+        vertical-align: middle;
+}
+
+.wp-caption {
+        background: transparent;
+        border: none;
+        margin: 0;
+        padding: 0;
+        text-align: left;
+}
+
+.wp-caption.alignleft {
+        margin: 5px 10px 5px 0;
+}
+
+.wp-caption.alignright {
+        margin: 5px 0 5px 10px;
+}
+
+.wp-caption-dt {
+        margin: 0;
+}
+
+.wp-caption .wp-caption-text,
+.wp-caption-dd {
+        color: #220e10;
+        font-style: italic;
+        font-weight: 300;
+        font-size: 18px;
+        line-height: 1.5;
+        margin-bottom: 24px;
+        padding: 0;
+}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpcontentthemestwentythirteenfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentythirteen/functions.php (23671 => 23672)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentythirteen/functions.php        2013-03-12 16:59:38 UTC (rev 23671)
+++ trunk/wp-content/themes/twentythirteen/functions.php        2013-03-12 17:27:24 UTC (rev 23672)
</span><span class="lines">@@ -100,25 +100,17 @@
</span><span class="cx"> add_action( 'after_setup_theme', 'twentythirteen_setup' );
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Loads our special font CSS file.
</del><ins>+ * Returns the Google font stylesheet URL, if available.
</ins><span class="cx">  *
</span><span class="cx">  * The use of Source Sans Pro and Bitter by default is localized. For languages
</span><span class="cx">  * that use characters not supported by the font, the font can be disabled.
</span><span class="cx">  *
</span><del>- * To disable in a child theme, use wp_dequeue_style()
- * function mytheme_dequeue_fonts() {
- *     wp_dequeue_style( 'twentythirteen-fonts' );
- * }
- * add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 );
- *
- * Also used in the Appearance &gt; Header admin panel:
- * @see twentythirteen_custom_header_setup()
- *
</del><span class="cx">  * @since Twenty Thirteen 1.0
</span><span class="cx">  *
</span><del>- * @return void
</del><ins>+ * @return string Font stylesheet or empty string if disabled.
</ins><span class="cx">  */
</span><del>-function twentythirteen_fonts() {
</del><ins>+function twentythirteen_fonts_url() {
+        $fonts_url = '';
</ins><span class="cx"> 
</span><span class="cx">         /* Translators: If there are characters in your language that are not
</span><span class="cx">          * supported by Source Sans Pro, translate this to 'off'. Do not translate
</span><span class="lines">@@ -146,12 +138,61 @@
</span><span class="cx">                         'family' =&gt; implode( '|', $font_families ),
</span><span class="cx">                         'subset' =&gt; 'latin,latin-ext',
</span><span class="cx">                 );
</span><del>-                wp_enqueue_style( 'twentythirteen-fonts', add_query_arg( $query_args, &quot;$protocol://fonts.googleapis.com/css&quot; ), array(), null );
</del><ins>+                $fonts_url = add_query_arg( $query_args, &quot;$protocol://fonts.googleapis.com/css&quot; );
</ins><span class="cx">         }
</span><ins>+
+        return $fonts_url;
</ins><span class="cx"> }
</span><ins>+
+/**
+ * Loads our special font CSS file.
+ *
+ * To disable in a child theme, use wp_dequeue_style()
+ * function mytheme_dequeue_fonts() {
+ *     wp_dequeue_style( 'twentythirteen-fonts' );
+ * }
+ * add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 );
+ *
+ * Also used in the Appearance &gt; Header admin panel:
+ * @see twentythirteen_custom_header_setup()
+ *
+ * @since Twenty Thirteen 1.0
+ *
+ * @return void
+ */
+function twentythirteen_fonts() {
+        $fonts_url = twentythirteen_fonts_url();
+        if ( ! empty( $fonts_url ) )
+                wp_enqueue_style( 'twentythirteen-fonts', esc_url_raw( $fonts_url ), array(), null );
+}
</ins><span class="cx"> add_action( 'wp_enqueue_scripts', 'twentythirteen_fonts' );
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Adds additional stylesheets to the TinyMCE editor if needed.
+ *
+ * @uses twentythirteen_fonts_url() to get the Google Font stylesheet URL.
+ *
+ * @since Twenty Thirteen 1.0
+ *
+ * @param string $mce_css CSS path to load in TinyMCE.
+ * @return string
+ */
+function twentythirteen_mce_css( $mce_css ) {
+        $fonts_url = twentythirteen_fonts_url();
+
+        if ( empty( $fonts_url ) )
+                return $mce_css;
+
+        if ( ! empty( $mce_css ) )
+                $mce_css .= ',';
+
+        $mce_css .= esc_url_raw( str_replace( ',', '%2C', $fonts_url ) );
+
+        return $mce_css;
+}
+add_filter( 'mce_css', 'twentythirteen_mce_css' );
+
+/**
</ins><span class="cx">  * Enqueues scripts and styles for front end.
</span><span class="cx">  *
</span><span class="cx">  * @since Twenty Thirteen 1.0
</span></span></pre>
</div>
</div>

</body>
</html>