Opened 5 years ago
Closed 5 years ago
#8097 closed defect (bug) (fixed)
RTL stylesheets must replace with regular ones, not extend them
Reported by: | geminorum | Owned by: | imath |
---|---|---|---|
Milestone: | 5.0.0 | Priority: | high |
Severity: | normal | Version: | |
Component: | Core | 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.
Hi @geminorum
Thanks a lot for your ticket and for your patch. Instead of defining a
$rtl
variable to eventually use the rtl version instead of the ltr, I think it can be achieved using'replace'
instead oftrue
for the last argument ofwp_style_add_data()
.For instance :
Could you check if it's the case and if so, update the patch accordingly ?