[wp-trac] [WordPress Trac] #62882: "Navigation Block CSS (style.min.css) Loads Even When Gutenberg is Disabled"

WordPress Trac noreply at wordpress.org
Sat Feb 1 18:11:58 UTC 2025


#62882: "Navigation Block CSS (style.min.css) Loads Even When Gutenberg is
Disabled"
--------------------------+-------------------------------
 Reporter:  jvrajput420   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:  css, performance
--------------------------+-------------------------------

Comment (by jvrajput420):

 @sabernhardt Thank you for your response and for the clarification!

 I understand that Astra and Twenty Twenty-Five rely on Gutenberg by
 default and that the Classic Editor plugin does not fully disable the
 block editor.

 However, in my case, even after switching to Classic Editor and ensuring
 that no block-related features (such as block widgets) were in use, the
 `wp-block-navigation-css` file was still loading unnecessarily.
 Additionally, I manually removed these styles in multiple projects without
 noticing any layout or functionality issues, and it led to improved page
 speed.

 I appreciate the recommendation to use the Disable Gutenberg plugin for a
 more complete removal of block-related assets. However, most developers
 may not be aware of this issue, and many might not check for unnecessary
 CSS files being loaded. Since this affects performance, **it would be
 better to address this in WordPress Core** rather than relying on external
 plugins to remove unnecessary styles.

 Would it be possible to add a condition in Core to prevent these styles
 from loading when the block editor is not actively used?

 Looking forward to further insights. Thanks again!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62882#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list