https://github.com/ryelle/rtl-style-example
https://github.com/ryelle/rtl-style-example
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ryelle/rtl-style-example
- Owner: ryelle
- Created: 2024-07-10T19:58:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-10T20:19:24.000Z (about 2 years ago)
- Last Synced: 2025-09-01T04:31:53.053Z (11 months ago)
- Language: JavaScript
- Size: 169 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# RTL Style Example plugin
This is a demo plugin to show that RTL styles are not being enqueued correctly when generated by wp-scripts & `register_block_type_from_metadata`.
To test it out, download the repo & drop it into the plugins directory of a WordPress install. Or use `wp-env start` from the root of the project (requires wp-env to be globally installed). `SCRIPT_DEBUG` should be false.
Create a post and add the "RTL Style Example" block. View post on the frontend. On an LTR langauge site (English), the text should have a border on the left.
Switch your site language to an RTL language (Settings > General), the admin and frontend will flip to use RTL styles. View the post again, and the border is still on the left. It _should_ be on the right, in RTL.
| LTR | RTL (incorrect) |
|---|---|
|  |  |