Ticket #45038: 45038.1.patch
File 45038.1.patch, 12.9 KB (added by , 6 years ago) |
---|
-
src/wp-content/themes/twentyten/blocks.css
1 /* 2 Theme Name: Twenty Ten 3 Description: Used to style Gutenberg Blocks. 4 */ 5 6 /*-------------------------------------------------------------- 7 >>> TABLE OF CONTENTS: 8 ---------------------------------------------------------------- 9 1.0 General Block Styles 10 2.0 Blocks - Common Blocks 11 3.0 Blocks - Formatting 12 4.0 Blocks - Layout Elements 13 5.0 Blocks - Widgets 14 6.0 Blocks - Colors 15 --------------------------------------------------------------*/ 16 17 /*-------------------------------------------------------------- 18 1.0 General Block Styles 19 --------------------------------------------------------------*/ 20 21 /* Captions */ 22 23 [class^="wp-block-"]:not(.wp-block-gallery) figcaption { 24 color: #777; 25 font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; 26 } 27 28 /*-------------------------------------------------------------- 29 2.0 Blocks - Common Blocks 30 --------------------------------------------------------------*/ 31 32 /* Paragraph */ 33 34 p.has-drop-cap:not(:focus)::first-letter { 35 font-size: 5em; 36 margin-top: 0.1em; 37 } 38 39 /* Image */ 40 41 .wp-block-image figcaption { 42 background: #f1f1f1; 43 margin: -7px 0 20px;; 44 padding: 9px 9px 1.0em; 45 text-align: center; 46 } 47 48 .wp-block-image.alignfull, 49 .wp-block-image.alignfull img { 50 margin: 0; 51 } 52 53 /* Gallery */ 54 55 .wp-block-gallery { 56 margin: 0 0 24px; 57 } 58 59 .wp-block-gallery .blocks-gallery-image figcaption, 60 .wp-block-gallery .blocks-gallery-item figcaption { 61 font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; 62 left: 0; 63 right: 0; 64 width: auto; 65 } 66 67 /* Quotes */ 68 69 .wp-block-quote:not(.is-large):not(.is-style-large) { 70 border: none; 71 padding: 0 3em; 72 } 73 74 .wp-block-quote cite { 75 color: inherit; 76 font-size: inherit; 77 font-weight: 600; 78 } 79 80 /* Audio */ 81 82 .wp-block-audio { 83 margin-left: 0; 84 margin-right: 0; 85 } 86 87 .wp-block-audio audio { 88 display: block; 89 width: 100%; 90 } 91 92 /* File */ 93 94 .rtl .wp-block-file * + .wp-block-file__button { 95 margin: 0 0 0 0.75em; 96 } 97 98 /*-------------------------------------------------------------- 99 3.0 Blocks - Formatting 100 --------------------------------------------------------------*/ 101 102 /* Code */ 103 104 .wp-block-code { 105 background-color: transparent; 106 border: 0; 107 padding: 0; 108 } 109 110 /* Pullquote */ 111 112 .wp-block-pullquote p { 113 font-size: 1.5em; 114 } 115 116 .wp-block-pullquote__citation, 117 .wp-block-pullquote cite { 118 color: inherit; 119 font-size: inherit; 120 font-weight: 600; 121 text-transform: none; 122 } 123 124 /* Table */ 125 126 .wp-block-table td, 127 .wp-block-table th { 128 border: none; 129 } 130 131 .wp-block-table td { 132 border-top: 1px solid #e7e7e7; 133 } 134 135 .wp-block-table tr:nth-child(odd) td { 136 background: #f2f7fc; 137 } 138 139 /*-------------------------------------------------------------- 140 4.0 Blocks - Layout Elements 141 --------------------------------------------------------------*/ 142 143 /* Separator */ 144 145 .wp-block-separator { 146 border: 0; 147 } 148 149 /*-------------------------------------------------------------- 150 5.0 Blocks - Widgets 151 --------------------------------------------------------------*/ 152 153 /* Comments */ 154 155 .wp-block-latest-comments { 156 margin: 0 0 24px; 157 } 158 159 /*-------------------------------------------------------------- 160 6.0 Blocks - Colors 161 --------------------------------------------------------------*/ 162 163 .has-blue-color { 164 color: #0066cc; 165 } 166 167 .has-blue-background-color { 168 background-color: #0066cc; 169 } 170 171 .has-black-color { 172 color: #000; 173 } 174 175 .has-black-background-color { 176 background-color: #000; 177 } 178 179 .has-medium-gray-color { 180 color: #666; 181 } 182 183 .has-medium-gray-background-color { 184 background-color: #666; 185 } 186 187 .has-light-gray-color { 188 color: #f1f1f1; 189 } 190 191 .has-light-gray-background-color { 192 background-color: #f1f1f1; 193 } 194 195 .has-white-color { 196 color: #fff; 197 } 198 199 .has-white-background-color { 200 background-color: #fff; 201 } -
src/wp-content/themes/twentyten/editor-blocks.css
1 /* 2 Theme Name: Twenty Ten 3 Description: Used to style Gutenberg Blocks in the editor. 4 */ 5 6 /*-------------------------------------------------------------- 7 >>> TABLE OF CONTENTS: 8 ---------------------------------------------------------------- 9 1.0 General Typography 10 2.0 General Block Styles 11 3.0 Blocks - Common Blocks 12 4.0 Blocks - Formatting 13 5.0 Blocks - Widgets 14 --------------------------------------------------------------*/ 15 16 /*-------------------------------------------------------------- 17 1.0 General Typograph 18 --------------------------------------------------------------*/ 19 20 .edit-post-visual-editor .editor-block-list__block, 21 .editor-default-block-appender input[type="text"].editor-default-block-appender__content { 22 } 23 24 .edit-post-visual-editor .editor-block-list__block .mce-content-body, 25 .wp-block-freeform.block-library-rich-text__tinymce p, 26 .wp-block-freeform.block-library-rich-text__tinymce li { 27 line-height: 1.5; 28 } 29 30 .edit-post-visual-editor .editor-block-list__block { 31 color: #1a1a1a; 32 } 33 34 .editor-post-title__block .editor-post-title__input { 35 color: #000; 36 font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; 37 font-size: 21px; 38 font-weight: bold; 39 line-height: 1.3em; 40 } 41 42 .edit-post-visual-editor .editor-block-list__block h1 { 43 font-size: 32px; 44 } 45 46 .edit-post-visual-editor .editor-block-list__block h2 { 47 font-size: 24px; 48 } 49 50 .edit-post-visual-editor .editor-block-list__block h3 { 51 font-size: 19px; 52 } 53 54 .edit-post-visual-editor .editor-block-list__block h4 { 55 font-size: 16px; 56 } 57 58 .edit-post-visual-editor .editor-block-list__block h5 { 59 font-size: 13px; 60 } 61 62 .edit-post-visual-editor .editor-block-list__block h6 { 63 font-size: 11px; 64 } 65 66 /*-------------------------------------------------------------- 67 2.0 General Block Styles 68 --------------------------------------------------------------*/ 69 70 /* Main column width */ 71 72 body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block, 73 body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender, 74 body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block { 75 max-width: 670px; /* 640px + 30px for padding */ 76 } 77 78 /* Link styles */ 79 80 .edit-post-visual-editor a, 81 .editor-block-list__block a, 82 .wp-block-freeform.block-library-rich-text__tinymce a { 83 color: #0066cc; 84 } 85 86 /* List styles */ 87 88 .edit-post-visual-editor ul:not(.wp-block-gallery), 89 .editor-block-list__block ul:not(.wp-block-gallery), 90 .block-library-list ul, 91 .edit-post-visual-editor ol, 92 .editor-block-list__block ol, 93 .block-library-list ol { 94 margin: 0 0 18px 1.5em; 95 padding: 0; 96 } 97 98 .edit-post-visual-editor ul:not(.wp-block-gallery), 99 .editor-block-list__block ul:not(.wp-block-gallery), 100 .block-library-list ul { 101 list-style: square; 102 } 103 104 .edit-post-visual-editor ol, 105 .editor-block-list__block ol, 106 .block-library-list ol { 107 list-style: decimal; 108 margin-left: 1.5em; 109 } 110 111 .edit-post-visual-editor ul:not(.wp-block-gallery) li, 112 .editor-block-list__block ul:not(.wp-block-gallery) li, 113 .edit-post-visual-editor ol li, 114 .editor-block-list__block ol li, 115 .block-library-list li { 116 margin-bottom: 0; 117 } 118 119 .edit-post-visual-editor ul:not(.wp-block-gallery) li > ul, 120 .editor-block-list__block ul:not(.wp-block-gallery) li > ul, 121 .block-library-list li > ul, 122 .edit-post-visual-editor li > ol, 123 .editor-block-list__block li > ol, 124 .block-library-list li > ol { 125 margin-bottom: 0; 126 } 127 128 .rtl .edit-post-visual-editor ul:not(.wp-block-gallery), 129 .rtl .editor-block-list__block ul:not(.wp-block-gallery), 130 .rtl .block-library-list ul, 131 .rtl .edit-post-visual-editor ol, 132 .rtl .editor-block-list__block ol, 133 .rtl .block-library-list ol { 134 margin-left: 0; 135 margin-right: 1.25em; 136 padding: 0; 137 } 138 139 /* Caption styles */ 140 141 [class^="wp-block-"] figcaption { 142 color: #777; 143 font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; 144 } 145 146 /* Code styles */ 147 148 .wp-block-freeform.block-library-rich-text__tinymce code { 149 background: transparent; 150 } 151 152 /* Quote styles */ 153 154 .wp-block-freeform.block-library-rich-text__tinymce blockquote { 155 border: 0; 156 padding: 0 3em; 157 } 158 159 /* Table styles */ 160 161 .editor-block-list__block tr th, 162 .editor-block-list__block tr th a { 163 font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; 164 } 165 166 /* Definition List styles */ 167 168 .editor-block-list__block dd { 169 margin-left: 0; 170 margin-right: 0; 171 } 172 173 /*-------------------------------------------------------------- 174 3.0 Blocks - Common Blocks 175 --------------------------------------------------------------*/ 176 177 /* Paragraph */ 178 179 p.has-drop-cap:not(:focus)::first-letter { 180 font-size: 5em; 181 margin-top: 0.1em; 182 } 183 184 /* Image */ 185 186 .wp-block-image { 187 margin-bottom: 20px; 188 } 189 190 .wp-block-image figcaption { 191 background: #f1f1f1; 192 display: block; 193 margin: -7px 0 0; 194 padding: 9px 9px 1.0em; 195 text-align: center; 196 } 197 198 /* Gallery */ 199 200 .wp-block-gallery { 201 margin: 0 0 24px; 202 } 203 204 /* Quote */ 205 206 .wp-block-quote { 207 border: 0; 208 padding: 0 3em; 209 } 210 211 .wp-block-quote:not(.is-large):not(.is-style-large) { 212 border: 0; 213 padding: 0 3em; 214 } 215 216 .wp-block-quote .wp-block-quote__citation { 217 font-size: 16px; 218 font-weight: 600; 219 } 220 221 /* Cover Image */ 222 223 .wp-block-cover-image-text { 224 font-size: 32px; 225 } 226 227 /* File */ 228 229 .wp-block-file .wp-block-file__textlink .editor-rich-text__tinymce { 230 color: #0066cc; 231 font-size: 16px; 232 text-decoration: underline; 233 } 234 235 /*-------------------------------------------------------------- 236 4.0 Blocks - Formatting 237 --------------------------------------------------------------*/ 238 239 /* Code */ 240 241 .wp-block-code { 242 border: 0; 243 padding: 0; 244 } 245 246 /* Pullquote */ 247 248 .wp-block-pullquote blockquote > .editor-rich-text p { 249 font-size: 1.5em; 250 } 251 252 .wp-block-pullquote .wp-block-pullquote__citation { 253 color: inherit; 254 font-size: inherit; 255 font-weight: 600; 256 text-transform: none; 257 } 258 259 /* Table */ 260 261 .wp-block-table tr:nth-child(odd) td { 262 background: #f2f7fc; 263 } 264 265 .wp-block-table th .wp-block-table__cell-content { 266 color: #777; 267 font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; 268 } 269 270 .editor-block-list__block .wp-block-table tr td { 271 padding-bottom: 0; 272 padding-top: 0; 273 } 274 275 /*-------------------------------------------------------------- 276 5.0 Blocks - Widgets 277 --------------------------------------------------------------*/ 278 279 /* Comments */ 280 281 .editor-block-list__block .wp-block-latest-comments { 282 margin: 0 0 24px; 283 } 284 285 .rtl .edit-post-visual-editor .wp-block-latest-comments { 286 margin-right: 0; 287 } -
src/wp-content/themes/twentyten/functions.php
75 75 // This theme styles the visual editor with editor-style.css to match the theme style. 76 76 add_editor_style(); 77 77 78 // Load regular editor styles into the new block-based editor. 79 add_theme_support( 'editor-styles' ); 80 81 // Load default block styles. 82 add_theme_support( 'wp-block-styles' ); 83 84 // Add support for custom color scheme. 85 add_theme_support( 'editor-color-palette', array( 86 array( 87 'name' => __( 'Blue', 'twentyten' ), 88 'slug' => 'blue', 89 'color' => '#0066cc', 90 ), 91 array( 92 'name' => __( 'Black', 'twentyten' ), 93 'slug' => 'black', 94 'color' => '#000', 95 ), 96 array( 97 'name' => __( 'Medium Gray', 'twentyten' ), 98 'slug' => 'medium-gray', 99 'color' => '#666', 100 ), 101 array( 102 'name' => __( 'Light Gray', 'twentyten' ), 103 'slug' => 'light-gray', 104 'color' => '#f1f1f1', 105 ), 106 array( 107 'name' => __( 'White', 'twentyten' ), 108 'slug' => 'white', 109 'color' => '#fff', 110 ), 111 ) ); 112 78 113 // Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories. 79 114 add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); 80 115 … … 612 647 return $args; 613 648 } 614 649 add_filter( 'widget_tag_cloud_args', 'twentyten_widget_tag_cloud_args' ); 650 651 /** 652 * Enqueue scripts and styles for front end. 653 * 654 * @since Twenty Ten 2.6 655 */ 656 function twentyten_scripts_styles() { 657 // Theme block stylesheet. 658 wp_enqueue_style( 'twentyten-block-style', get_template_directory_uri() . '/blocks.css', array(), '1.0' ); 659 } 660 add_action( 'wp_enqueue_scripts', 'twentyten_scripts_styles' ); 661 662 /** 663 * Enqueue editor styles for Gutenberg 664 * 665 * @since Twenty Ten 2.6 666 */ 667 function twentyten_block_editor_styles() { 668 // Block styles. 669 wp_enqueue_style( 'twentyten-block-editor-style', get_template_directory_uri() . '/editor-blocks.css' ); 670 } 671 add_action( 'enqueue_block_editor_assets', 'twentyten_block_editor_styles' ); 672 673