[wp-trac] [WordPress Trac] #24977: Workflow change: automate RTL css generation
WordPress Trac
noreply at wordpress.org
Fri Aug 30 16:22:38 UTC 2013
#24977: Workflow change: automate RTL css generation
----------------------------+------------------
Reporter: yoavf | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.7
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
----------------------------+------------------
Comment (by y0natan):
Just FYI: automatic flipping of background-positions with unit lengths
'''is''' possible in modern browsers (Chrome, FF, IE9+), with four-value
position syntax.
I have a fork of the python cssjanus which does just that at
https://github.com/yonatan/rtl-toolkit
It turns
{{{background: url(image.jpg) 12px top;}}}
into
{{{background: url(image-rtlx.jpg) 12px top;background-position:right 12px
top 0%;}}}
The first background declaration swaps the image with a horizontally
flipped version and leaves in the original position for IE8, which
requires some javascript after page load to measure and reposition
background images. The background-position that follows does the right
thing in modern browsers.
Unfortunately it doesn't support a lot of CSS3 properties, and CSSJanus'
regexp-centric approach makes it a little difficult to maintain and
improve.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24977#comment:31>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list