-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the way RTL styles get enqueued #28274
Conversation
Size Change: 0 B Total Size: 1.28 MB ℹ️ View Unchanged
|
We should add the same change in logic for I guess there it would require some prior validation if the RTL version of the file exists. |
…etadata Related Gutenberg issue: WordPress/gutenberg#28274 With this change it is going to be possible to use the same pattern that wp_style_add_data uses for RTL handling. If the block style file with "-rtl.css" is included in addition to the regular style referenced in "block.json" file then it is going to be automatically registered. Props swisspidy, aristath. See #52301. git-svn-id: https://develop.svn.wordpress.org/trunk@49982 602fd350-edb4-49c9-b593-d223f7449a82
…etadata Related Gutenberg issue: WordPress/gutenberg#28274 With this change it is going to be possible to use the same pattern that wp_style_add_data uses for RTL handling. If the block style file with "-rtl.css" is included in addition to the regular style referenced in "block.json" file then it is going to be automatically registered. Props swisspidy, aristath. See #52301. git-svn-id: https://develop.svn.wordpress.org/trunk@49982 602fd350-edb4-49c9-b593-d223f7449a82
I added very similar handling for In the future, we will be able to register all styles through |
…etadata Related Gutenberg issue: WordPress/gutenberg#28274 With this change it is going to be possible to use the same pattern that wp_style_add_data uses for RTL handling. If the block style file with "-rtl.css" is included in addition to the regular style referenced in "block.json" file then it is going to be automatically registered. Props swisspidy, aristath. See #52301. Built from https://develop.svn.wordpress.org/trunk@49982 git-svn-id: http://core.svn.wordpress.org/trunk@49683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…etadata Related Gutenberg issue: WordPress/gutenberg#28274 With this change it is going to be possible to use the same pattern that wp_style_add_data uses for RTL handling. If the block style file with "-rtl.css" is included in addition to the regular style referenced in "block.json" file then it is going to be automatically registered. Props swisspidy, aristath. See #52301. Built from https://develop.svn.wordpress.org/trunk@49982 git-svn-id: https://core.svn.wordpress.org/trunk@49683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This PR changes the way RTL styles get loaded. Instead of having conditionals in PHP to determine if we need to load the RTL styles or not, it now uses
wp_style_add_data
as proposed in #25220 (review)How has this been tested?
Tested using the RTL Tester plugin.
Checklist:
I've included developer documentation if appropriate.I've updated all React Native files affected by any refactorings/renamings in this PR.