FSE script into iframe insertion needs to be less restrictive on how it determines whether to include a stylesheet #42509
Labels
[Feature] Blocks
Overall functionality of blocks
Needs Technical Feedback
Needs testing from a developer perspective.
[Package] Block editor
/packages/block-editor
[Type] Enhancement
A suggestion for improvement.
Description
In the Site Editor, Block CSS should be included without needing to use wp-block as a CSS selector in the built stylesheet, it should be included in the iframe by virtue of it being registered through enqueue_block_assets.
My suggestion would be to add to enqueue_block_assets a data-attr/some "block asset" identifier to just scan for instead, because whether or not the right selectors are in the stylesheet shouldn't be the sole criteria for including it in the FSE.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Specifically this section:
https://github.com/WordPress/gutenberg/blob/0a6a23b213c4fe9e3b337c8b71fa87bbf82c4496/packages/block-editor/src/components/iframe/index.js
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: