Skip to content

Commit

Permalink
Merge pull request #108 from Automattic/fix/grid-editor-styles
Browse files Browse the repository at this point in the history
Fix loading of style.css inside the editor
  • Loading branch information
johngodley authored Jun 29, 2020
2 parents 05ac5ef + 8da6cda commit 331a247
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/layout-grid/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
add_action( 'init', function() {
register_block_type( 'jetpack/layout-grid', [
'editor_script' => 'block-experiments',
'style' => 'block-experiments',
'editor_style' => 'block-experiments-editor',
'render_callback' => function( $attribs, $content ) {
wp_enqueue_style( 'block-experiments' );
wp_enqueue_style( 'wpcom-layout-grid-front' );
return $content;
},
] );

register_block_type( 'jetpack/layout-grid-column', [
'editor_script' => 'block-experiments',
'style' => 'block-experiments',
'editor_style' => 'block-experiments-editor',
'render_callback' => function( $attribs, $content ) {
wp_enqueue_style( 'block-experiments' );
wp_enqueue_style( 'wpcom-layout-grid-front' );
return $content;
},
Expand Down
6 changes: 6 additions & 0 deletions bundler/resources/jetpack-layout-grid/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ You can follow development, file an issue, suggest features, and view the source
* Add vertical alignment to grid and grid columns
* Mirror grid device breakpoint with editor preview breakpoint

= 1.2.3 - 29th June 2020 =
* Fix some styles not loading in the editor

= 1.2.2 - 23rd June 2020 =
* Fix the CSS loading fix from 1.2.1 so it uses wp_register_style

= 1.2.1 - 10th June 2020 =
* Fix block inserter to show inside a grid column
* Fix vertical margin in editor so it better matches the display
Expand Down

0 comments on commit 331a247

Please sign in to comment.