[wp-trac] [WordPress Trac] #64674: Option to disable default Gutenberg block styles globally from admin

WordPress Trac noreply at wordpress.org
Fri Feb 20 08:26:30 UTC 2026


#64674: Option to disable default Gutenberg block styles globally from admin
--------------------------------------------+-----------------------------
 Reporter:  ravikhadka                      |      Owner:  (none)
     Type:  enhancement                     |     Status:  new
 Priority:  normal                          |  Milestone:  Awaiting Review
Component:  General                         |    Version:  6.9.1
 Severity:  normal                          |   Keywords:  needs-patch
  Focuses:  ui, accessibility, performance  |
--------------------------------------------+-----------------------------
 Currently, many developers and site owners disable default Gutenberg block
 styles (wp-block-library CSS) to improve frontend performance and avoid
 unused CSS.

 At the moment, this requires manual code such as:

 {{{#!php
 <?php
 remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
 remove_action( 'wp_enqueue_scripts', 'wp_enqueue_block_library_css' );
 }}}


 This approach is not user-friendly and requires editing theme
 functions.php or creating a custom plugin.

 Proposed enhancement:
 Add a native toggle inside WordPress admin (Settings > Performance or
 Writing) to allow disabling default block styles globally.

 Benefits:
 - Improves frontend performance by reducing unused CSS
 - Helpful for custom theme developers
 - Reduces need for custom code snippets
 - Keeps WordPress flexible for both beginners and advanced developers

 Possible implementation:
 A simple checkbox option stored in wp_options that conditionally dequeues
 block library styles on frontend.

 This would provide a cleaner and more official way to manage block styles
 without manual code changes.

 Would love feedback from core contributors on feasibility and best
 approach.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64674>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list