Skip to content

Conversation

@gmjuhasz
Copy link

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.scss from /*! to /*.

Testing Instructions

  1. Checkout this branch
  2. Run npm run build
  3. Check packages/block-library/build-style/media-text/style.css
  4. Verify RTLCSS directives use /*rtl: instead of /*!rtl:
  5. The comments should not appear in minified production CSS

@github-actions
Copy link

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: gmjuhasz <[email protected]>
Co-authored-by: ocean90 <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

👋 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.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Nov 12, 2025
@Mamaduka Mamaduka added [Type] Performance Related to performance efforts [Block] Media & Text Affects the Media & Text Block labels Nov 12, 2025
@Mamaduka Mamaduka requested a review from ocean90 November 12, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Media & Text Affects the Media & Text Block First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Performance Related to performance efforts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control directives for RTLCSS are not removed in production CSS

3 participants