Ticket #45038: 45038.diff
File 45038.diff, 5.9 KB (added by , 6 years ago) |
---|
-
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 --------------------------------------------------------------*/ 13 14 /*-------------------------------------------------------------- 15 1.0 General Block Styles 16 --------------------------------------------------------------*/ 17 18 /* Captions */ 19 20 figure { 21 background: #f1f1f1; 22 margin-bottom: 20px; 23 max-width: 632px !important; 24 } 25 26 .wp-block-image .aligncenter > figcaption, 27 .wp-block-image .alignleft > figcaption, 28 .wp-block-image .alignright > figcaption, 29 .wp-block-image.is-resized > figcaption { 30 display: block; 31 padding: 4px; 32 text-align: center; 33 } 34 35 /*-------------------------------------------------------------- 36 2.0 Blocks - Common Blocks 37 --------------------------------------------------------------*/ 38 39 .wp-block-quote:not(.is-large):not(.is-style-large) { 40 border-left: none; 41 } 42 43 .wp-block-image.alignfull, 44 .wp-block-image.alignfull img { 45 margin: 0; 46 } 47 48 .wp-block-image, 49 .wp-block-image img { 50 display: block; 51 } 52 53 .wp-caption { 54 background: #f1f1f1; 55 line-height: 18px; 56 margin-bottom: 20px; 57 max-width: 632px !important; 58 padding: 4px; 59 text-align: center; 60 } 61 62 /*-------------------------------------------------------------- 63 3.0 Blocks - Formatting 64 --------------------------------------------------------------*/ 65 66 .wp-block-table td, 67 .wp-block-table th { 68 border: none; 69 } 70 71 .wp-block-table td { 72 border-top: 1px solid #e7e7e7; 73 } 74 75 .wp-block-table tr:nth-child(odd) td { 76 background: #f2f7fc; 77 } 78 -
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 Block Styles 10 2.0 Blocks - Common Blocks 11 --------------------------------------------------------------*/ 12 13 /*-------------------------------------------------------------- 14 1.0 General Block Styles 15 --------------------------------------------------------------*/ 16 17 /* Captions */ 18 19 [data-type="core/image"][data-align=center] .editor-block-list__block-edit .editor-rich-text, 20 [data-type="core/image"][data-align=left] .editor-block-list__block-edit .editor-rich-text, 21 [data-type="core/image"][data-align=right] .editor-block-list__block-edit .editor-rich-text { 22 display: block; 23 } 24 25 [data-type="core/image"][data-align=center] .editor-block-list__block-edit figure, 26 [data-type="core/image"][data-align=left] .editor-block-list__block-edit figure, 27 [data-type="core/image"][data-align=right] .editor-block-list__block-edit figure { 28 background: #f1f1f1; 29 margin-bottom: 20px; 30 max-width: 632px !important; 31 } 32 33 [data-type="core/image"][data-align=center] .editor-block-list__block-edit figure > figcaption, 34 [data-type="core/image"][data-align=left] .editor-block-list__block-edit figure > figcaption, 35 [data-type="core/image"][data-align=right] .editor-block-list__block-edit { 36 display: block; 37 padding: 4px; 38 text-align: center; 39 } 40 41 /*-------------------------------------------------------------- 42 2.0 Blocks - Common Blocks 43 --------------------------------------------------------------*/Twenty 44 45 .wp-block-quote:not(.is-large):not(.is-style-large) { 46 border-left: none; 47 padding-left: 1em; 48 } 49 50 .wp-block-image, 51 .wp-block-image img { 52 display: block; 53 } 54 55 .edit-post-visual-editor .editor-block-list__block[data-align=full] { 56 max-width: 610px; 57 margin: auto; 58 } 59 60 .components-toolbar__control.components-button:not(:disabled).is-active > svg, 61 .components-toolbar__control.components-button:not(:disabled).is-active > svg > * { 62 color: #fff; 63 } 64 No newline at end of file -
wp-content/themes/twentyten/functions.php
76 76 // This theme styles the visual editor with editor-style.css to match the theme style. 77 77 add_editor_style(); 78 78 79 // Load regular editor styles into the new block-based editor. 80 add_theme_support( 'editor-styles' ); 81 82 // Load default block styles. 83 add_theme_support( 'wp-block-styles' ); 84 79 85 // Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories. 80 86 add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); 81 87 … … 655 661 return $args; 656 662 } 657 663 add_filter( 'widget_tag_cloud_args', 'twentyten_widget_tag_cloud_args' ); 664 665 /** 666 * Enqueue scripts and styles for front end. 667 * 668 * @since Twenty Ten 2.5 669 */ 670 function twentyten_scripts_styles() { 671 // Theme block stylesheet. 672 wp_enqueue_style( 'twentyten-block-style', get_theme_file_uri( '/blocks.css' ), array(), '1.0' ); 673 } 674 add_action( 'wp_enqueue_scripts', 'twentyten_scripts_styles' ); 675 676 /** 677 * Enqueue editor styles for Gutenberg 678 * 679 * @since Twenty Ten 2.5 680 */ 681 function twentyten_block_editor_styles() { 682 // Block styles. 683 wp_enqueue_style( 'twentyten-block-editor-style', get_template_directory_uri() . '/editor-blocks.css' ); 684 } 685 add_action( 'enqueue_block_editor_assets', 'twentyten_block_editor_styles' ); 686 687