Make WordPress Core

Ticket #21376: 21376.3.diff

File 21376.3.diff, 6.9 KB (added by DrewAPicture, 13 years ago)

group and selector spacing, etc.

  • 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/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-style.css

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