Make WordPress Core

Ticket #21376: 21376.2.diff

File 21376.2.diff, 6.8 KB (added by obenland, 13 years ago)

Iteration 2

  • 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        margin: 0;
     115        padding: 24px;
     116        padding: 1.714285714rem;
     117}
     118pre {
     119        border: 1px solid #ededed;
     120        color: #666;
     121        font-family: Consolas, Monaco, Lucida Console, monospace;
     122        font-size: 12px;
     123        font-size: 0.857142857rem;
     124        line-height: 1.714285714;
     125        margin: 24px 0;
     126        margin: 1.714285714rem 0;
     127        overflow: auto;
     128        padding: 24px;
     129        padding: 1.714285714rem;
     130}
     131code, kbd, samp, var {
     132        font-family: Consolas, Monaco, Lucida Console, monospace;
     133        font-size: 12px;
     134        font-size: 0.857142857rem;
     135        line-height: 2;
     136}
     137abbr, acronym, dfn {
     138        border-bottom: 1px dotted #666;
     139        cursor: help;
     140}
     141address {
     142        display: block;
     143        line-height: 1.714285714;
     144        margin: 0 0 24px;
     145        margin: 0 0 1.714285714rem;
     146}
     147del {
     148        /* TODO */
     149}
     150ins {
     151        /* TODO */
     152}
     153sup,
     154sub {
     155        font-size: 75%;
     156        line-height: 0;
     157        position: relative;
     158        vertical-align: baseline;
     159}
     160sup {
     161        top: -0.5em;
     162}
     163sub {
     164        bottom: -0.25em;
     165}
     166input[type=text] {
     167        border: 1px solid #ccc;
     168        border-radius: 3px;
     169        font-family: inherit;
     170        padding: 6px;
     171        padding: 0.428571429rem;
     172}       
     173textarea {
     174        border: 1px solid #d5d2ca;
     175        border-radius: 3px;
     176        font-family: inherit;
     177        font-size: 12px;
     178        font-size: 0.857142857rem;
     179        line-height: 1.714285714;
     180        padding: 10px;
     181        padding: 0.714285714rem;
     182        width: 96%;
     183}
     184
     185/* Links */
     186a,
     187a em,
     188a strong {
     189        outline: none;
     190        color: #21759b;
     191}
     192a:focus,
     193a:active,
     194a:hover {
     195        color: #0f3647;
     196}
     197
     198/* Alignment */
     199.alignleft {
     200        display: inline;
     201        float: left;
     202}
     203.alignright {
     204        display: inline;
     205        float: right;
     206        margin: 12px 0 12px 24px;
     207        margin: 0.857142857rem 0 0.857142857rem 1.714285714rem;
     208}
     209.aligncenter {
     210        clear: both;
     211        display: block;
     212        margin-top: 12px;
     213        margin-top: 0.857142857rem;
     214        margin-bottom: 12px;
     215        margin-bottom: 0.857142857rem;
     216}
     217
     218/* Tables */
     219table {
     220        border-bottom: 1px solid #ededed;
     221        border-collapse: collapse;
     222        border-spacing: 0;
     223        color: #777;
     224        font-size: 12px;
     225        font-size: 0.857142857rem;
     226        line-height: 2;
     227        margin: 0 0 24px;
     228        margin: 0 0 1.714285714rem;
     229        width: 100%;
     230}
     231tr th {
     232        color: #636363;
     233        font-size: 11px;
     234        font-size: 0.785714286rem;
     235        font-weight: bold;
     236        line-height: 2.181818182;
     237        text-align: left;
     238        text-transform: uppercase;
     239}
     240td {
     241        border-top: 1px solid #ededed !important;
     242        color: #777;
     243        font-size: inherit;
     244        font-weight: normal;
     245        text-align: left;
     246        padding: 6px 10px 6px 0;
     247}
     248
     249/* Images */
     250img {
     251        border: 0;
     252        border-radius: 3px;
     253        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
     254        max-width: 100%;
     255}
     256img.size-full {
     257        width: auto/9; /* Prevent stretching of full-size images in IE8 */
     258}
     259img[class*="wp-image-"] {
     260        height: auto;
     261        max-width: 100%;
     262}
     263
     264img.alignleft {
     265        margin: 12px 24px 12px 0;
     266        margin: 0.857142857rem 1.714285714rem 0.857142857rem 0;
     267}
     268img[class*="align"],
     269img[class*="wp-image-"],
     270img[class*="attachment-"] {
     271        height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */
     272}
     273img.mceWPnextpage {
     274        border-radius: 0;
     275        box-shadow: none;
     276}
     277img.wp-smiley {
     278        border: 0;
     279        border-radius: 0;
     280        box-shadow: none;
     281        margin-bottom: 0;
     282        margin-top: 0;
     283        padding: 0;
     284}
     285.wp-caption {
     286        background: transparent;
     287        border: none;
     288        margin: 0;
     289        padding: 4px;
     290        text-align: left;
     291}
     292.wp-caption-dt {
     293        margin: 0;
     294}
     295.wp-caption .wp-caption-text,
     296.wp-caption-dd {
     297        color: #777;
     298        font-style: italic;
     299        font-size: 12px;
     300        font-size: 0.857142857rem;
     301        line-height: 2;
     302        margin: 0 0 24px;
     303        margin: 0 0 1.71429rem;
     304}
     305 No newline at end of file