Skip to content

Commit

Permalink
Site editor: remove "default" admin CSS (#66431)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored Oct 24, 2024
1 parent a712932 commit d2ba0dc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backport-changelog/6.8/7642.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7642

* https://github.com/WordPress/gutenberg/pull/66431
11 changes: 11 additions & 0 deletions lib/compat/wordpress-6.8/remove-default-css.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

function gutenberg_remove_default_css( $hook ) {
// Maybe also remove on post.php when Gutenberg is enabled for posts.
if ( 'site-editor.php' !== $hook ) {
return;
}
wp_dequeue_style( 'colors' );
}

add_action( 'admin_enqueue_scripts', 'gutenberg_remove_default_css' );
1 change: 1 addition & 0 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function gutenberg_is_experiment_enabled( $name ) {
require __DIR__ . '/compat/wordpress-6.7/rest-api.php';

// WordPress 6.8 compat.
require __DIR__ . '/compat/wordpress-6.8/remove-default-css.php';
require __DIR__ . '/compat/wordpress-6.8/block-comments.php';
require __DIR__ . '/compat/wordpress-6.8/class-gutenberg-rest-comment-controller-6-8.php';

Expand Down

0 comments on commit d2ba0dc

Please sign in to comment.