Make WordPress Core

Ticket #21376: 21376.diff

File 21376.diff, 6.7 KB (added by obenland, 13 years ago)

Iteration 1

  • wp-content/themes/twentytwelve/functions.php

     
    5656        // Load up our theme options page and related code.
    5757        require( get_template_directory() . '/inc/theme-options.php' );
    5858        $twentytwelve_options = new Twenty_Twelve_Options();
    59 
    60         // You can define support for an editor stylesheet here; Twenty Twelve doesn't have a default one.
    61         // Then, create a CSS file called editor-style.css and place it in your theme directory.
     59       
     60        // Some awesome comment that explains why we have to add another editor style
     61        $options = $twentytwelve_options->get_theme_options();
     62        if ( $options['enable_fonts'] )
     63                add_editor_style( 'editor-font.css' );
     64       
     65        // This theme styles the visual editor with editor-style.css to match the theme style.
    6266        add_editor_style();
    63 
     67       
     68               
    6469        // Add default posts and comments RSS feed links to <head>.
    6570        add_theme_support( 'automatic-feed-links' );
    6671
  • wp-content/themes/twentytwelve/editor-font.css

     
     1@import url("http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700");
     2 No newline at end of file
  • wp-content/themes/twentytwelve/editor-style.css

     
     1/*
     2Theme Name: Twenty Twelve
     3Description: Used to style the TinyMCE editor.
     4*/
     5
     6html {
     7        font-size: 87.5%;
     8}
     9html .mceContentBody {
     10        max-width: 625px;
     11}
     12body {
     13        color: #444;
     14        font-family: "Open Sans", Helvetica, Arial, sans-serif;
     15        font-size: 14px;
     16        font-size: 1rem;
     17        line-height: 1;
     18        text-rendering: optimizeLegibility;
     19        vertical-align: baseline;
     20}
     21
     22/* Headings */
     23h1, h2, h3, h4, h5, h6 {
     24        clear: both;
     25        line-height: 1.846153846;
     26        margin: 24px 0;
     27        margin: 1.714285714rem 0;
     28}
     29h1 {
     30        font-size: 21px;
     31        font-size: 1.5rem;
     32        line-height: 1.5;
     33}
     34h2 {
     35        font-size: 18px;
     36        font-size: 1.285714286rem;
     37        line-height: 1.6;
     38}
     39h3 {
     40        font-size: 16px;
     41        font-size: 1.142857143rem;
     42}
     43h4 {
     44        font-size: 14px;
     45        font-size: 1rem;
     46}
     47h5 {
     48        font-size: 13px;
     49        font-size: 0.928571429rem;
     50}
     51h6 {
     52        font-size: 12px;
     53        font-size: 0.857142857rem;
     54}
     55hr {
     56        /* TODO */
     57}
     58
     59/* Text elements */
     60p {
     61        margin: 0 0 24px;
     62        margin: 0 0 1.714285714rem;
     63        line-height: 1.714285714;
     64}
     65ul, ol {
     66        margin: 0 0 24px;
     67        margin: 0 0 1.714285714rem;
     68        line-height: 1.714285714;
     69        padding: 0;
     70}
     71ul {
     72        list-style: disc outside;
     73}
     74ol {
     75        list-style: decimal outside;
     76}
     77ul ul, ol ol, ul ol, ol ul {
     78        margin-bottom: 0;
     79}
     80li {
     81        margin: 0 0 0 24px;
     82        margin: 0 0 0 1.714285714rem;
     83}
     84dl {
     85        margin: 0 24px;
     86        margin: 0 1.714285714rem;
     87}
     88dt {
     89        font-weight: bold;
     90        margin-bottom: 24px;
     91        margin-bottom: 1.714285714rem;
     92}
     93dd {
     94        line-height: 1.714285714;
     95        margin: 0 0 24px;
     96        margin: 0 0 1.714285714rem;
     97}
     98strong {
     99        font-weight: bold;
     100}
     101cite, em, i {
     102        font-style: italic;
     103}
     104cite {
     105        border: none;
     106}
     107
     108big {
     109        /* TODO */
     110}
     111.mceContentBody blockquote {
     112        font-style: italic !important;
     113        font-weight: normal;
     114        padding: 24px;
     115        padding: 1.714285714rem;
     116}
     117pre {
     118        border: 1px solid #ededed;
     119        color: #666;
     120        font-family: Consolas, Monaco, Lucida Console, monospace;
     121        font-size: 12px;
     122        font-size: 0.857142857rem;
     123        line-height: 1.714285714;
     124        margin: 24px 0;
     125        margin: 1.714285714rem 0;
     126        overflow: auto;
     127        padding: 24px;
     128        padding: 1.714285714rem;
     129}
     130code, kbd, samp, var {
     131        font-family: Consolas, Monaco, Lucida Console, monospace;
     132        font-size: 12px;
     133        font-size: 0.857142857rem;
     134        line-height: 2;
     135}
     136abbr, acronym, dfn {
     137        border-bottom: 1px dotted #666;
     138        cursor: help;
     139}
     140address {
     141        display: block;
     142        line-height: 1.714285714;
     143        margin: 0 0 24px;
     144        margin: 0 0 1.714285714rem;
     145}
     146del {
     147        /* TODO */
     148}
     149ins {
     150        /* TODO */
     151}
     152sup,
     153sub {
     154        font-size: 75%;
     155        line-height: 0;
     156        position: relative;
     157        vertical-align: baseline;
     158}
     159sup {
     160        top: -0.5em;
     161}
     162sub {
     163        bottom: -0.25em;
     164}
     165input[type=text] {
     166        border: 1px solid #ccc;
     167        border-radius: 3px;
     168        font-family: inherit;
     169        padding: 6px;
     170        padding: 0.428571429rem;
     171}       
     172textarea {
     173        border: 1px solid #d5d2ca;
     174        border-radius: 3px;
     175        font-family: inherit;
     176        font-size: 12px;
     177        font-size: 0.857142857rem;
     178        line-height: 1.714285714;
     179        padding: 10px;
     180        padding: 0.714285714rem;
     181        width: 96%;
     182}
     183
     184/* Links */
     185a,
     186a em,
     187a strong {
     188        outline: none;
     189        color: #21759b;
     190}
     191a:focus,
     192a:active,
     193a:hover {
     194        color: #0f3647;
     195}
     196
     197/* Alignment */
     198.alignleft {
     199        display: inline;
     200        float: left;
     201}
     202.alignright {
     203        display: inline;
     204        float: right;
     205        margin: 12px 0 12px 24px;
     206        margin: 0.857142857rem 0 0.857142857rem 1.714285714rem;
     207}
     208.aligncenter {
     209        clear: both;
     210        display: block;
     211        margin-top: 12px;
     212        margin-top: 0.857142857rem;
     213        margin-bottom: 12px;
     214        margin-bottom: 0.857142857rem;
     215}
     216
     217/* Tables */
     218table {
     219        border-bottom: 1px solid #ededed;
     220        border-collapse: collapse;
     221        border-spacing: 0;
     222        color: #777;
     223        font-size: 12px;
     224        font-size: 0.857142857rem;
     225        line-height: 2;
     226        margin: 0 0 24px;
     227        margin: 0 0 1.714285714rem;
     228        width: 100%;
     229}
     230tr th {
     231        color: #636363;
     232        font-size: 11px;
     233        font-size: 0.785714286rem;
     234        font-weight: bold;
     235        line-height: 2.181818182;
     236        text-align: left;
     237        text-transform: uppercase;
     238}
     239td {
     240        border-top: 1px solid #ededed !important;
     241        color: #777;
     242        font-size: inherit;
     243        font-weight: normal;
     244        text-align: left;
     245        padding: 6px 10px 6px 0;
     246}
     247
     248/* Images */
     249img {
     250        border: 0;
     251        max-width: 100%;
     252}
     253img.size-full {
     254        width: auto/9; /* Prevent stretching of full-size images in IE8 */
     255}
     256img[class*="wp-image-"] {
     257        border-radius: 3px;
     258        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
     259        height: auto;
     260        max-width: 100%;
     261}
     262
     263img.alignleft {
     264        margin: 12px 24px 12px 0;
     265        margin: 0.857142857rem 1.714285714rem 0.857142857rem 0;
     266}
     267img[class*="align"],
     268img[class*="wp-image-"],
     269img[class*="attachment-"] {
     270        height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */
     271}
     272img.wp-smiley {
     273        border: 0;
     274        border-radius: 0;
     275        box-shadow: none;
     276        margin-bottom: 0;
     277        margin-top: 0;
     278        padding: 0;
     279}
     280.wp-caption {
     281        background: transparent;
     282        border: none;
     283        padding: 4px;
     284        text-align: left;
     285}
     286.wp-caption-dt {
     287        margin: 0;
     288}
     289.wp-caption .wp-caption-text,
     290.wp-caption-dd {
     291        font-style: italic;
     292        font-size: 12px;
     293        font-size: 0.857142857rem;
     294        line-height: 2;
     295        color: #777;
     296}
     297 No newline at end of file