[wp-trac] [WordPress Trac] #26316: Colour Scheme picker doesn't switch with RTL
WordPress Trac
noreply at wordpress.org
Wed Dec 4 18:45:02 UTC 2013
#26316: Colour Scheme picker doesn't switch with RTL
--------------------------+------------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.8
Component: RTL | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------
Comment (by nacin):
The issue here is that RTL is handled by the script loader, while color
schemes are a separate beast. The actual URL used for the color scheme
doesn't match what is registered, thanks to all of our fancy juggling.
This occurs in two places: wp_style_loader_src(), to define a URL for the
'colors' "meta" handle; and in WP_Styles::do_item(), which deals with RTL
stuff.
This bug also means that the color picker only previews minified color
files, never the development versions. Not a big deal, though.
I attached what I was playing with to debug this. Ideally,
wp_admin_css_color() should accept the handle of a registered style
instead of a URL. That way we wouldn't be guessing when it came to
.min.css versus .css (or .css versus .dev.css), whether it supported RTL,
whether the RTL was in-addition-to or should replace it, etc. This was a
mess when we moved from .dev.css to .min.css (especially since .css went
from being minified to raw) and MP6 makes it worse.
Alternatively, we might need to expose some helper methods on WP_Styles
that can generate a URL outside the context of doing an item. That's not
fun either.
FWIW, we didn't previously have an RTL version of colors stylesheets,
instead opting for some .rtl classes. This means we could simply ignore
the in-addition-to or replace issue, and assume that no other colors
stylesheets have an RTL stylesheet. Indeed, in 3.7, colors-fresh.css
wasn't defined as an RTL stylesheet, so a color scheme wouldn't have had
support for -rtl.css out of the box. This does make things a bit easier
here.
We still can't blindly replace .css with -rtl.css because it will break
3rd-party color schemes, but I think 3.8 was breaking them anyway in RTL
(in general, not in preview) and in other contexts anyway. I will test
with the bbPress color scheme.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26316#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list