jquery-archive / css-chassis

An attempt at creating an open standard for both CSS and JavaScript UI libraries.
https://css-chassis.com
Other
351 stars 67 forks source link

Support RTL #37

Open arschmitz opened 9 years ago

arschmitz commented 9 years ago

We should support RTL orientation.

Reference on some discussion on this from jQuery UI and Mobile last week. https://docs.google.com/document/d/1BBS44SMPcAr60EVgrsROUvO7CqldeziBLthPmSjZrCg/edit

cvrebert commented 9 years ago

So, will you output two self-contained separate LTR and RTL CSS files, or an RTL override CSS file to be used together with the main CSS file? If the latter, what fancy tool will you use to generate it?

cjolif commented 9 years ago

I think @cvrebert question is particularly important. In theory at least only an override (and under a specific selector) is a fully workable solution. Indeed the same app might well mix RTL and LTR languages and so both CSS need to be able to live on the same page and the RTL one should be able to apply only to a subset of the page.

arschmitz commented 9 years ago

@cvrebert sorry for taking so long to answer this missed it somehow. @cjolif thanks for getting my attention. So there is no firm plan here yet we are working with some experts on other jQuery Foundation Projects and will likely try to include chassis as this progresses. Our most recent discussions did indeed highlight the need to allowing mixed page content in RTL / LTR. The most promising approach we think was indeed 2 style sheets but you would be able use them together, to support both simultaneously.

cvrebert commented 9 years ago

Will the common, non-text-direction-specific styles be duplicated in both stylesheets?

arschmitz commented 9 years ago

@cvrebert this is all still super up in the air we have only had initial talks but no i think the plan was a regular LTR style sheet and an additional stylesheet that would add RTL on top.

MichaelArestad commented 9 years ago

Two stylesheets is generally a solid approach. We can use CSSjanus to generate the majority.

rxaviers commented 9 years ago

This could be of interest: http://www.w3.org/International/geo/html-tech/tech-bidi.html

thejdeep commented 8 years ago

The only problem with having an additional CSS files adding RTL on top is a huge stress on maintainability and an additional HTTP request. +1 for using two stylesheets. We could integrate automatic RTL'ing into the workflow.

cvrebert commented 8 years ago

:dir() could be useful, if only it was more widely supported by browsers.