Ticket #21376: 21376.diff

File 21376.diff, 6.7 KB (added by obenland, 10 months ago)

Iteration 1

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