Ticket #45040: 45040.4.patch
File 45040.4.patch, 21.6 KB (added by , 6 years ago) |
---|
-
src/wp-content/themes/twentytwelve/css/blocks.css
1 /* 2 Theme Name: Twenty Twelve 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-"] figcaption { 24 color: #757575; 25 font-size: 12px; 26 font-size: 0.857142857rem; 27 line-height: 2; 28 font-style: italic; 29 text-align: left; 30 } 31 32 [class^="wp-block-"].alignleft, 33 [class^="wp-block-"] .alignleft { 34 margin-right: 24px; 35 } 36 37 [class^="wp-block-"].alignright, 38 [class^="wp-block-"] .alignright { 39 margin-left: 24px; 40 } 41 42 .rtl [class^="wp-block-"] figcaption { 43 text-align: right; 44 } 45 46 /*-------------------------------------------------------------- 47 2.0 Blocks - Common Blocks 48 --------------------------------------------------------------*/ 49 50 /* Paragraph */ 51 52 p.has-drop-cap:not(:focus)::first-letter { 53 font-size: 5em; 54 margin-top: 0.1em; 55 } 56 57 /* Image */ 58 59 .wp-block-image figure:not(.aligncenter) { 60 line-height: 0; 61 margin: 0 1.714285714rem; 62 } 63 64 .wp-block-image figure.alignleft { 65 margin: 0.857142857rem 1.714285714rem 0.857142857rem 0; 66 } 67 68 .wp-block-image figure.alignright { 69 margin: 0.857142857rem 0 0.857142857rem 1.714285714rem; 70 } 71 72 .wp-block-image figcaption { 73 padding-top: 0.75em; 74 } 75 76 [class^="wp-block-"].alignleft, 77 [class^="wp-block-"] .alignleft, 78 [class^="wp-block-"].alignright, 79 [class^="wp-block-"] .alignright { 80 81 } 82 83 /* Gallery */ 84 85 .wp-block-gallery { 86 margin-bottom: 24px; 87 margin-bottom: 1.714285714rem; 88 } 89 90 .wp-block-gallery .blocks-gallery-image figcaption, 91 .wp-block-gallery .blocks-gallery-item figcaption { 92 left: 0; 93 right: 0; 94 text-align: center; 95 width: auto; 96 } 97 98 /* Quote */ 99 100 .wp-block-quote:not(.is-large):not(.is-style-large) { 101 border: 0; 102 padding: 1.714285714rem; 103 padding: 24px; 104 } 105 106 .wp-block-quote { 107 padding: 1.714285714rem; 108 padding: 24px; 109 } 110 111 .wp-block-quote cite { 112 color: inherit; 113 font-size: inherit; 114 font-style: italic; 115 } 116 117 .wp-block-quote.is-large p, 118 .wp-block-quote.is-style-large p { 119 font-size: 20px; 120 } 121 122 /* Audio */ 123 124 .wp-block-audio audio { 125 display: block; 126 margin-bottom: 1.714285714rem; 127 width: 100%; 128 } 129 130 /* Cover Image */ 131 132 .wp-block-cover-image.aligncenter { 133 display: flex; 134 } 135 136 /* File */ 137 138 .wp-block-file .wp-block-file__button { 139 background-color: #e6e6e6; 140 background-repeat: repeat-x; 141 background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6); 142 background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6); 143 background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6); 144 background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6); 145 background-image: linear-gradient(top, #f4f4f4, #e6e6e6); 146 border: 1px solid #d2d2d2; 147 border-radius: 3px; 148 box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1); 149 color: #7c7c7c; 150 font-family: inherit; 151 font-size: 11px; 152 font-size: 0.785714286rem; 153 font-weight: normal; 154 line-height: 1.428571429; 155 padding: 6px 10px; 156 padding: 0.428571429rem 0.714285714rem; 157 } 158 159 .wp-block-file .wp-block-file__button:hover, 160 .wp-block-file .wp-block-file__button:focus { 161 background-color: #ebebeb; 162 background-image: -moz-linear-gradient(top, #f9f9f9, #ebebeb); 163 background-image: -ms-linear-gradient(top, #f9f9f9, #ebebeb); 164 background-image: -webkit-linear-gradient(top, #f9f9f9, #ebebeb); 165 background-image: -o-linear-gradient(top, #f9f9f9, #ebebeb); 166 background-image: linear-gradient(top, #f9f9f9, #ebebeb); 167 background-repeat: repeat-x; 168 color: #5e5e5e; 169 } 170 171 .wp-block-file .wp-block-file__button:focus { 172 background-color: #e1e1e1; 173 background-image: -moz-linear-gradient(top, #ebebeb, #e1e1e1); 174 background-image: -ms-linear-gradient(top, #ebebeb, #e1e1e1); 175 background-image: -webkit-linear-gradient(top, #ebebeb, #e1e1e1); 176 background-image: -o-linear-gradient(top, #ebebeb, #e1e1e1); 177 background-image: linear-gradient(top, #ebebeb, #e1e1e1); 178 background-repeat: repeat-x; 179 border-color: transparent; 180 box-shadow: inset 0 0 8px 2px #c6c6c6, 0 1px 0 0 #f4f4f4; 181 color: #757575; 182 } 183 184 .rtl .wp-block-file * + .wp-block-file__button { 185 margin-left: 0.75em; 186 margin-right: 0; 187 } 188 189 /* Video */ 190 191 .wp-block-video video:not(:last-child) { 192 margin-bottom: 0; 193 } 194 195 /*-------------------------------------------------------------- 196 3.0 Blocks - Formatting 197 --------------------------------------------------------------*/ 198 199 /* Code */ 200 201 pre.wp-block-code { 202 border: 0; 203 padding: 0; 204 } 205 206 /* Pullquote */ 207 208 .wp-block-pullquote__citation, 209 .wp-block-pullquote cite, 210 .wp-block-pullquote footer { 211 font-size: 14px; 212 text-transform: none; 213 } 214 215 /* Table */ 216 217 .wp-block-table { 218 border-bottom: 1px solid #ededed; 219 border-collapse: collapse; 220 border-spacing: 0; 221 font-size: 14px; 222 line-height: 2; 223 margin: 0 0 20px; 224 width: 100%; 225 } 226 227 .wp-block-table th { 228 border: 0; 229 font-weight: bold; 230 padding: 6px 10px 6px 0; 231 text-transform: uppercase; 232 } 233 234 .wp-block-table td { 235 border: 0; 236 border-top: 1px solid #ededed; 237 padding: 6px 10px 6px 0; 238 } 239 240 /*-------------------------------------------------------------- 241 4.0 Blocks - Layout Elements 242 --------------------------------------------------------------*/ 243 244 /* Buttons */ 245 246 .wp-block-button .wp-block-button__link, 247 .wp-block-button .wp-block-button__link:visited { 248 background-color: #e6e6e6; 249 background-repeat: repeat-x; 250 background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6); 251 background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6); 252 background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6); 253 background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6); 254 background-image: linear-gradient(top, #f4f4f4, #e6e6e6); 255 border: 1px solid #d2d2d2; 256 border-radius: 3px; 257 box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1); 258 color: #7c7c7c; 259 font-family: inherit; 260 font-size: 11px; 261 font-size: 0.785714286rem; 262 font-weight: normal; 263 line-height: 1.428571429; 264 padding: 6px 10px; 265 padding: 0.428571429rem 0.714285714rem; 266 } 267 268 .wp-block-button .wp-block-button__link:hover, 269 .wp-block-button .wp-block-button__link:focus { 270 background-color: #ebebeb; 271 background-image: -moz-linear-gradient(top, #f9f9f9, #ebebeb); 272 background-image: -ms-linear-gradient(top, #f9f9f9, #ebebeb); 273 background-image: -webkit-linear-gradient(top, #f9f9f9, #ebebeb); 274 background-image: -o-linear-gradient(top, #f9f9f9, #ebebeb); 275 background-image: linear-gradient(top, #f9f9f9, #ebebeb); 276 background-repeat: repeat-x; 277 color: #5e5e5e; 278 } 279 280 .wp-block-button .wp-block-button__link:active { 281 background-color: #e1e1e1; 282 background-image: -moz-linear-gradient(top, #ebebeb, #e1e1e1); 283 background-image: -ms-linear-gradient(top, #ebebeb, #e1e1e1); 284 background-image: -webkit-linear-gradient(top, #ebebeb, #e1e1e1); 285 background-image: -o-linear-gradient(top, #ebebeb, #e1e1e1); 286 background-image: linear-gradient(top, #ebebeb, #e1e1e1); 287 background-repeat: repeat-x; 288 border-color: transparent; 289 box-shadow: inset 0 0 8px 2px #c6c6c6, 0 1px 0 0 #f4f4f4; 290 color: #757575; 291 } 292 293 /* Separator */ 294 295 .wp-block-separator { 296 border: 0; 297 } 298 299 /*-------------------------------------------------------------- 300 5.0 Blocks - Widgets 301 --------------------------------------------------------------*/ 302 303 /* Latest Comments */ 304 305 .wp-block-latest-comments { 306 margin: 0; 307 padding: 0; 308 } 309 310 .wp-block-latest-comments .avatar, 311 .wp-block-latest-comments__comment-avatar { 312 border-radius: 0; 313 box-shadow: none; 314 } 315 316 .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt, 317 .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta { 318 margin-left: 60px; 319 } 320 321 .wp-block-latest-comments__comment, 322 .wp-block-latest-comments__comment-excerpt, 323 .wp-block-latest-comments__comment-excerpt p { 324 font-size: 14px; 325 } 326 327 .wp-block-latest-comments__comment-excerpt p:last-child { 328 margin-bottom: 0; 329 } 330 331 .wp-block-latest-comments__comment-date { 332 color: #5e5e5e; 333 } 334 335 .wp-block-latest-comments .wp-block-latest-comments__comment { 336 margin: 0; 337 padding: 24px 0; 338 padding: 1.714285714rem 0 0; 339 } 340 341 .wp-block-latest-comments article { 342 margin-bottom: 0; 343 } 344 345 /*-------------------------------------------------------------- 346 6.0 Blocks - Colors 347 --------------------------------------------------------------*/ 348 349 .has-blue-color { 350 color: #21759b; 351 } 352 353 .has-blue-background-color { 354 background-color: #21759b; 355 } 356 357 .has-dark-gray-color { 358 color: #373737; 359 } 360 361 .has-dark-gray-background-color { 362 background-color: #373737; 363 } 364 365 .has-medium-gray-color { 366 color: #9f9f9f; 367 } 368 369 .has-medium-gray-background-color { 370 background-color: #9f9f9f; 371 } 372 373 .has-light-gray-color { 374 color: #e6e6e6; 375 } 376 377 .has-light-gray-background-color { 378 background-color: #e6e6e6; 379 } 380 381 .has-white-color { 382 color: #fff; 383 } 384 385 .has-white-background-color { 386 background-color: #fff; 387 } -
src/wp-content/themes/twentytwelve/css/editor-blocks.css
1 /* 2 Theme Name: Twenty Twelve 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 - Layout Elements 14 6.0 Blocks - Widgets 15 --------------------------------------------------------------*/ 16 17 /*-------------------------------------------------------------- 18 1.0 General Typography 19 --------------------------------------------------------------*/ 20 21 .edit-post-visual-editor .editor-block-list__block, 22 .edit-post-visual-editor .editor-block-list__block p, 23 .editor-default-block-appender input[type="text"].editor-default-block-appender__content { 24 font-size: 14px; 25 } 26 27 .edit-post-visual-editor .editor-block-list__block { 28 color: #444; 29 } 30 31 .editor-post-title__block .editor-post-title__input { 32 font-family: "Open Sans", Helvetica, Arial, sans-serif; 33 font-size: 20px; 34 font-weight: 400; 35 } 36 37 @media screen and (min-width: 600px) { 38 .editor-post-title__block .editor-post-title__input { 39 font-size: 22px; 40 } 41 } 42 43 .wp-block-freeform.block-library-rich-text__tinymce h1 { 44 font-size: 21px; 45 } 46 47 .wp-block-freeform.block-library-rich-text__tinymce h2 { 48 font-size: 18px; 49 } 50 51 .wp-block-freeform.block-library-rich-text__tinymce h3 { 52 font-size: 16px; 53 } 54 55 .wp-block-freeform.block-library-rich-text__tinymce h4 { 56 font-size: 14px; 57 } 58 59 .wp-block-freeform.block-library-rich-text__tinymce h5 { 60 font-size: 13px; 61 } 62 63 .wp-block-freeform.block-library-rich-text__tinymce h6 { 64 font-size: 12px; 65 } 66 67 /*-------------------------------------------------------------- 68 2.0 General Block Styles 69 --------------------------------------------------------------*/ 70 71 /* Main column width */ 72 73 body.gutenberg-editor-page .edit-post-visual-editor .editor-post-title__block, 74 body.gutenberg-editor-page .edit-post-visual-editor .editor-default-block-appender, 75 body.gutenberg-editor-page .edit-post-visual-editor .editor-block-list__block { 76 max-width: 655px; 77 } 78 79 /* Link styles */ 80 81 .edit-post-visual-editor a, 82 .editor-block-list__block a, 83 .wp-block-freeform.block-library-rich-text__tinymce a { 84 color: #21759b; 85 } 86 87 /* List styles */ 88 89 .wp-block-freeform.block-library-rich-text__tinymce ol, 90 .wp-block-freeform.block-library-rich-text__tinymce ul:not(.wp-block-gallery), 91 .block-library-list ol.editor-rich-text__tinymce, 92 .block-library-list ul.editor-rich-text__tinymce:not(.wp-block-gallery) { 93 padding-left: 0; 94 padding-right: 0; 95 } 96 97 /* Quote styles */ 98 99 .wp-block-freeform.block-library-rich-text__tinymce blockquote { 100 border: 0; 101 font-style: italic; 102 padding: 24px; 103 } 104 105 /* Table styles */ 106 107 .wp-block-freeform.block-library-rich-text__tinymce th { 108 font-size: 11px; 109 } 110 111 .wp-block-freeform.block-library-rich-text__tinymce td { 112 font-size: 12px; 113 } 114 115 .wp-block-freeform.block-library-rich-text__tinymce th, 116 .wp-block-freeform.block-library-rich-text__tinymce td { 117 padding-left: 0; 118 padding-right: 0; 119 } 120 121 .rtl .wp-block-freeform.block-library-rich-text__tinymce th, 122 .rtl .wp-block-freeform.block-library-rich-text__tinymce td { 123 text-align: right; 124 } 125 126 /* Code styles */ 127 128 .wp-block-freeform.block-library-rich-text__tinymce code { 129 background-color: transparent; 130 font-size: 12px; 131 } 132 133 /* Pre styles */ 134 135 .wp-block-freeform.block-library-rich-text__tinymce pre { 136 font-size: 12px; 137 } 138 139 /* Captions */ 140 141 [class^="wp-block-"] figcaption, 142 [class^="wp-block-"] figcaption.editor-rich-text__tinymce.mce-content-body { 143 color: #757575; 144 font-size: 12px; 145 line-height: 2; 146 font-style: italic; 147 text-align: left; 148 } 149 150 .rtl [class^="wp-block-"] figcaption, 151 .rtl [class^="wp-block-"] figcaption.editor-rich-text__tinymce.mce-content-body { 152 text-align: right; 153 } 154 155 /* Definition Lists */ 156 157 .wp-block-freeform.block-library-rich-text__tinymce dt { 158 margin-bottom: 0; 159 } 160 161 /*-------------------------------------------------------------- 162 3.0 Blocks - Common Blocks 163 --------------------------------------------------------------*/ 164 165 /* Paragraph */ 166 167 p.has-drop-cap:not(:focus)::first-letter { 168 font-size: 5em; 169 margin-top: 0.1em; 170 } 171 172 /* Image */ 173 174 .wp-block-image { 175 margin-left: 0; 176 margin-right: 0; 177 } 178 179 /* Gallery */ 180 181 .wp-block-gallery { 182 margin-bottom: 24px; 183 } 184 185 .wp-block-gallery figcaption, 186 .wp-block-gallery figcaption.editor-rich-text__tinymce.mce-content-body { 187 color: #fff; 188 text-align: center; 189 } 190 191 /* Quote */ 192 193 .wp-block-quote, 194 .wp-block-quote:not(.is-large):not(.is-style-large) { 195 padding: 24px; 196 } 197 198 .wp-block-quote p { 199 font-style: italic; 200 } 201 202 .wp-block-quote:not(.is-large):not(.is-style-large) { 203 border: 0; 204 } 205 206 .wp-block-quote.is-large p, 207 .wp-block-quote.is-style-large p { 208 font-size: 20px; 209 } 210 211 .wp-block-quote .wp-block-quote__citation { 212 color: inherit; 213 font-style: italic; 214 } 215 216 .wp-block-quote.is-large .wp-block-quote__citation, 217 .wp-block-quote.is-style-large .wp-block-quote__citation { 218 font-size: 18px; 219 } 220 221 /* Cover Image */ 222 223 .edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p { 224 font-size: 28px; 225 } 226 227 /* File */ 228 229 .wp-block-file .wp-block-file__textlink { 230 color: #21759b; 231 text-decoration: underline; 232 } 233 234 .wp-block-file .wp-block-file__button, 235 .wp-block-button .wp-block-button__link:hover { 236 background-color: #e6e6e6; 237 background-repeat: repeat-x; 238 background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6); 239 background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6); 240 background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6); 241 background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6); 242 background-image: linear-gradient(top, #f4f4f4, #e6e6e6); 243 border: 1px solid #d2d2d2; 244 border-radius: 3px; 245 box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1); 246 color: #7c7c7c; 247 font-family: inherit; 248 font-size: 11px; 249 font-weight: normal; 250 line-height: 1.428571429; 251 padding: 6px 10px; 252 } 253 254 /*-------------------------------------------------------------- 255 4.0 Blocks - Formatting 256 --------------------------------------------------------------*/ 257 258 /* Verse */ 259 260 .editor-block-list__block .wp-block-verse pre { 261 font-size: 12px; 262 } 263 264 /* Code */ 265 266 .wp-block-code { 267 border: 0; 268 font-size: 12px; 269 line-height: 2; 270 padding: 0; 271 } 272 273 .wp-block-html .CodeMirror-sizer { 274 line-height: 1.7; 275 } 276 277 /* Preformatted */ 278 279 .editor-block-list__block .wp-block-preformatted pre { 280 font-size: 12px; 281 } 282 283 /* Pullquote */ 284 285 .wp-block-pullquote { 286 font-style: italic; 287 } 288 289 .edit-post-visual-editor .wp-block-pullquote { 290 margin: 0; 291 } 292 293 .wp-block-pullquote .wp-block-pullquote__citation, 294 .wp-block-pullquote cite { 295 font-size: 14px; 296 text-transform: none; 297 } 298 299 /* Table */ 300 301 .wp-block-table { 302 border-bottom: 1px solid #ededed; 303 border-collapse: collapse; 304 border-spacing: 0; 305 font-size: 14px; 306 line-height: 2; 307 margin: 0 0 20px; 308 width: 100%; 309 } 310 311 .editor-block-list__block .wp-block-table th { 312 border: 0; 313 font-size: 11px; 314 font-weight: bold; 315 text-transform: uppercase; 316 } 317 318 .editor-block-list__block .wp-block-table td { 319 border: 0; 320 border-top: 1px solid #ededed; 321 font-size: 12px; 322 padding: 0; 323 } 324 325 .wp-block-table__cell-content { 326 padding: 6px 10px 6px 0; 327 } 328 329 /*-------------------------------------------------------------- 330 5.0 Blocks - Layout Elements 331 --------------------------------------------------------------*/ 332 333 /* Buttons */ 334 335 .wp-block-button .wp-block-button__link, 336 .wp-block-button .wp-block-button__link:hover { 337 background-color: #e6e6e6; 338 background-repeat: repeat-x; 339 background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6); 340 background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6); 341 background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6); 342 background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6); 343 background-image: linear-gradient(top, #f4f4f4, #e6e6e6); 344 border: 1px solid #d2d2d2; 345 border-radius: 3px; 346 box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1); 347 color: #7c7c7c; 348 font-family: inherit; 349 font-size: 11px; 350 font-weight: normal; 351 line-height: 1.428571429; 352 padding: 6px 10px; 353 } 354 355 /* Separator */ 356 357 .editor-block-list__block hr.wp-block-separator { 358 margin-left: auto; 359 margin-right: auto; 360 } 361 362 /*-------------------------------------------------------------- 363 6.0 Blocks - Widgets 364 --------------------------------------------------------------*/ 365 366 /* Archives */ 367 .gutenberg ul.wp-block-archives { 368 padding-left: 0; 369 } 370 371 /* Categories */ 372 373 .gutenberg .wp-block-categories ul { 374 padding-left: 0; 375 } 376 377 /* Latest Comments */ 378 379 .editor-block-list__block .wp-block-latest-comments { 380 margin: 0; 381 padding: 0; 382 } 383 384 .wp-block-latest-comments .avatar, 385 .wp-block-latest-comments__comment-avatar { 386 border-radius: 0; 387 box-shadow: none; 388 } 389 390 .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt, 391 .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta { 392 margin-left: 60px; 393 } 394 395 .wp-block-latest-comments__comment, 396 .wp-block-latest-comments__comment-excerpt, 397 .wp-block-latest-comments__comment-excerpt p { 398 font-size: 14px; 399 } 400 401 .wp-block-latest-comments__comment-excerpt p:last-child { 402 margin-bottom: 0; 403 } 404 405 .wp-block-latest-comments__comment-date { 406 color: #5e5e5e; 407 } 408 409 .wp-block-latest-comments .wp-block-latest-comments__comment { 410 margin: 0; 411 padding: 24px 0; 412 } 413 414 .wp-block-latest-comments article { 415 border-bottom: 4px double #ededed; 416 padding-bottom: 2em; 417 } 418 419 /* Latest Posts */ 420 421 .gutenberg .wp-block-latest-posts { 422 padding-left: 0; 423 padding-right: 0; 424 } -
src/wp-content/themes/twentytwelve/functions.php
54 54 // This theme styles the visual editor with editor-style.css to match the theme style. 55 55 add_editor_style(); 56 56 57 // Load regular editor styles into the new block-based editor. 58 add_theme_support( 'editor-styles' ); 59 60 // Load default block styles. 61 add_theme_support( 'wp-block-styles' ); 62 63 // Add support for custom color scheme. 64 add_theme_support( 'editor-color-palette', array( 65 array( 66 'name' => __( 'Blue', 'twentytwelve' ), 67 'slug' => 'blue', 68 'color' => '#21759b', 69 ), 70 array( 71 'name' => __( 'Dark Gray', 'twentytwelve' ), 72 'slug' => 'dark-gray', 73 'color' => '#444', 74 ), 75 array( 76 'name' => __( 'Medium Gray', 'twentytwelve' ), 77 'slug' => 'medium-gray', 78 'color' => '#9f9f9f', 79 ), 80 array( 81 'name' => __( 'Light Gray', 'twentytwelve' ), 82 'slug' => 'light-gray', 83 'color' => '#e6e6e6', 84 ), 85 array( 86 'name' => __( 'White', 'twentytwelve' ), 87 'slug' => 'white', 88 'color' => '#fff', 89 ), 90 ) ); 91 57 92 // Adds RSS feed links to <head> for posts and comments. 58 93 add_theme_support( 'automatic-feed-links' ); 59 94 … … 151 186 // Loads our main stylesheet. 152 187 wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() ); 153 188 189 // Theme block stylesheet. 190 wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20181018' ); 191 154 192 // Loads the Internet Explorer specific stylesheet. 155 193 wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' ); 156 194 $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' ); … … 158 196 add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); 159 197 160 198 /** 199 * Enqueue editor styles for Gutenberg 200 * 201 * @since Twenty Twelve 2.6 202 */ 203 function twentytwelve_block_editor_styles() { 204 // Block styles. 205 wp_enqueue_style( 'twentytwelve-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' ); 206 // Add custom fonts. 207 wp_enqueue_style( 'twentytwelve-fonts', twentytwelve_get_font_url(), array(), null ); 208 } 209 add_action( 'enqueue_block_editor_assets', 'twentytwelve_block_editor_styles' ); 210 211 /** 161 212 * Add preconnect for Google Fonts. 162 213 * 163 214 * @since Twenty Twelve 2.2