Making WordPress.org

Opened 4 years ago

Closed 4 years ago

#5602 closed defect (bug) (wontfix)

Dequeue /wp-includes/css/dist/block-library/style.min.css

Reported by: jonoaldersonwp's profile jonoaldersonwp Owned by:
Milestone: Priority: low
Component: General Keywords: performance
Cc:

Description

The block library default stylesheet loads on every page throughout wordpress.org, but is only used in a small number of locations.

This impacts performance across the site, and has a not-inconsiderable carbon cost.

The file should be dequeued, and only enqueued conditionally when blocks are present/used (or, more bluntly, by template if that's easier to implement)

Change History (3)

#1 @joyously
4 years ago

I argued from the beginning that this should be in core, as it affects ALL sites, not just .org.

#2 @jonoaldersonwp
4 years ago

Yeah, it's not pleasant. Thankfully there are initiatives plodding along to unpick that and refactor it in a bit more gracefully. Would be nice to get ahead of that timeline on wp.org and save some bytes, though.

#3 @dd32
4 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

This needs to be taken upstream, dequeueing / disabling it globally on WordPress.org and only enabling it where needed is not a viable solution here, no matter how bad it is for performance.

We could theoretically disable it for specific sites, such as the Theme / Plugin directories, but I'm hesitant to do that, as it's a style that'll be more relied upon as more things are built as blocks.

Note: See TracTickets for help on using tickets.