for better RTL language support, I've created *-rtl.css files.


commerce-rtlstyle-1.patch10.54 KBnavid.kashani
PASSED: [[SimpleTest]]: [MySQL] 3,567 pass(es). View


marcin.wosinek’s picture

I've noticed that in few places rlt files are not symmetrical:
So in modules/checkout/theme/commerce_checkout.base-rtl.css we have
.checkout-processing {
padding-right: 0 !important;
padding-left: 13px !important;
margin-right: 0;
margin-left: 6px;
background-position: left center;

while in modules/checkout/theme/commerce_checkout.base.css just
.checkout-processing {
padding-right: 13px !important; /* LTR */
margin-right: 6px; /* LTR */
background: url(../images/status-active.gif) right center no-repeat; /* LTR */

I'm not sure if it's 'perfect correct' that way (especially if this will be implemented http://groups.drupal.org/node/194488), but anyway I believe it will be better then no rtl css files.

rszrama’s picture

Can I maybe get a little more explanation on how this works? Is the idea that adding /* LTR */ to the file just points out places you'll have to reverse if you're writing an RTL theme? And as the above comment indicates, are these supposed to be symmetrical or are they asymmetrical to avoid having to swap certain padding, margin, etc.?

navid.kashani’s picture

For more information, you can see this page: http://drupal.org/node/222782 or Core Drupal modules

sorry for my bad english

marcin.wosinek’s picture

Exactly, idea for /* LTR */ tags is just to mark places which you need to reverse. They are planing to add some mechanism to auto create *-rlt.css files some day.

rszrama’s picture

Ahh, I see. The asymmetry, then, is just compensating for the fact that our base stylesheet is using padding-right specifically as opposed to padding. The padding-right has to be nullified and the equal width padding-left added. Is there anything we need to do to tell Drupal that our module includes some -rtl.css stylesheets or are they discovered automatically?

marcin.wosinek’s picture

"If a RTL language is being displayed, Drupal will for each stylesheet, look for a supplemental RLT stylesheet to load."

From "drupal 7 module development". It was meant for css introduced by module, though I haven't tested.

navid.kashani’s picture

from drupal 6, *-rtl.css are added automatically in RTL Language

rszrama’s picture

Status: Needs review » Fixed

Wonderful. Thanks for following up on this issue guys - I've just committed it.

Welcome to the committers log, Navid. : )

navid.kashani’s picture

many thanks Ryan

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.