FSE: inline block styles minification issues with calc()
Description
In 10.1 the loading method of block styles on the frontend was changed, see https://github.com/WordPress/gutenberg/pull/28358
There is an issue with the minified inline styles, specifically the removal of spacing in calc() functions.
e.g. the columns stylesheet contains flex-basis:calc(50% - 1em)
whereas the minified inline style now renders the same as flex-basis:calc(50%-1em) with the required spacing stripped out, resulting in an invalid value.
WordPress information
- WordPress version: 5.6.2
- Gutenberg version: 10.1.0
- Are all plugins except Gutenberg deactivated? Yes
- Are you using a default theme (e.g. Twenty Twenty-One)? Yes - TT1Blocks
@aristath, any hints on how it could be resolved? Well, I know that one of the following regular expressions need some tweaks: https://github.com/WordPress/gutenberg/blob/771a45b305f6bf3104710c6f277d3fb7592cf86e/lib/blocks.php#L293-L294
Pushed a fix in #29554, pending review.