Media & Text: Fix RTLCSS control directives appearing in production CSS#73205
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @gmjuhasz! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
…SS (#73205) Co-authored-by: gmjuhasz <gmjuhasz@git.wordpress.org> Co-authored-by: ocean90 <ocean90@git.wordpress.org>
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: