Opened 7 years ago
Closed 7 years ago
#8097 closed defect (bug) (fixed)
RTL stylesheets must replace with regular ones, not extend them
| Reported by: | geminorum | Owned by: | imath |
|---|---|---|---|
| Priority: | high | Milestone: | 5.0.0 |
| Component: | Core | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
The old WordPress way of registering RTL styles is to extend default css with RTL diffs. But the RTLCSS npm package generates a full RTL version of styles and must replace with the default. So wp_style_add_data() will not work correctly since it enqueues both styles together.
Attachments (2)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @geminorum
Thanks a lot for your ticket and for your patch. Instead of defining a
$rtlvariable to eventually use the rtl version instead of the ltr, I think it can be achieved using'replace'instead oftruefor the last argument ofwp_style_add_data().For instance :
Could you check if it's the case and if so, update the patch accordingly ?