gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

FSE: inline block styles minification issues with calc()

Open Sandstromer opened this issue 5 years ago • 2 comments

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

Sandstromer avatar Mar 03 '21 14:03 Sandstromer

@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

gziolo avatar Mar 04 '21 06:03 gziolo

Pushed a fix in #29554, pending review.

aristath avatar Mar 04 '21 09:03 aristath