Media & Text: Fix RTLCSS control directives appearing in production CSS #73205
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Closes #73193
Fixes RTLCSS control directive comments appearing in minified production CSS for the Media & Text block.
Why?
The
/*!syntax preserves comments during minification. RTLCSS control directives like/*!rtl:begin:ignore*/should use/*instead so they are stripped during minification and don't appear in production CSS files shipped with WordPress Core.As reported in #73193, these directives are currently visible in WordPress 6.8.3's minified CSS at
wp-includes/blocks/media-text/style.min.css.How?
Changed all RTLCSS control directives in
packages/block-library/src/media-text/style.scssfrom/*!to/*.Testing Instructions
npm run buildpackages/block-library/build-style/media-text/style.css/*rtl:instead of/*!rtl: