[wp-trac] [WordPress Trac] #56990: Render blocking CSS `classic-themes.css` unnecessarily enqueued
WordPress Trac
noreply at wordpress.org
Mon Nov 14 17:58:21 UTC 2022
#56990: Render blocking CSS `classic-themes.css` unnecessarily enqueued
-------------------------------------+-------------------------------
Reporter: adamsilverstein | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1.2
Component: Themes | Version: 6.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: css, performance
-------------------------------------+-------------------------------
Comment (by adamsilverstein):
Hey @scruffian - thanks for the feedback!
> Does has_block( 'button' ) work for buttons in templates as well as in
post content?
No idea (sounds like no?), but would a button in a template even be
possible in a non-block theme (which is the context we are discussing
here)?
> There is no need for a totally different file here. Originally this CSS
was added to the blocks css that Gutenberg generates, but we had trouble
with the unit tests, which is why we went this route (see
https://github.com/WordPress/wordpress-develop/pull/3481).
Thank you so much for providing this link, I tried to figure out why this
CSS file was included in the first place and couldn't figure out why. Even
reading that though, I don't quite understand why including the CSS in
"the block CSS that Gutenberg Generates" - which feels like the best
solution - would cause the unit tests to fail. Do you have know why they
failed?
I'm going to review the commit history on that PR to see if I can move the
styles into the block in core - or is this something we need to do in
Gutenberg?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56990#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list