Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryelle/rtl-style-example
https://github.com/ryelle/rtl-style-example
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ryelle/rtl-style-example
- Owner: ryelle
- Created: 2024-07-10T19:58:49.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-10T20:19:24.000Z (6 months ago)
- Last Synced: 2024-10-09T23:22:53.848Z (3 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) |
|---|---|
| ![ltr](https://github.com/ryelle/rtl-style-example/assets/541093/ab1fa193-5e55-4fe2-9fe8-5daf9c573f46) | ![rtl](https://github.com/ryelle/rtl-style-example/assets/541093/0e7fcd28-209e-4922-a87d-c72faa23c478) |