Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hi,
for better RTL language support, I've created *-rtl.css files.
Thanks
Comment | File | Size | Author |
---|---|---|---|
commerce-rtlstyle-1.patch | 10.54 KB | navid.kashani | |
Comments
Comment #1
marcin.wosinek CreditAttribution: marcin.wosinek commentedI'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.
Comment #2
rszrama CreditAttribution: rszrama commentedCan 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.?
Comment #3
navid.kashani CreditAttribution: navid.kashani commentedFor more information, you can see this page: http://drupal.org/node/222782 or Core Drupal modules
sorry for my bad english
Comment #4
marcin.wosinek CreditAttribution: marcin.wosinek commented#2
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.
Comment #5
rszrama CreditAttribution: rszrama commentedAhh, 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?
Comment #6
marcin.wosinek CreditAttribution: marcin.wosinek commented"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.
Comment #7
navid.kashani CreditAttribution: navid.kashani commentedfrom drupal 6, *-rtl.css are added automatically in RTL Language
Comment #8
rszrama CreditAttribution: rszrama commentedWonderful. Thanks for following up on this issue guys - I've just committed it.
Welcome to the committers log, Navid. : )
Comment #9
navid.kashani CreditAttribution: navid.kashani commentedmany thanks Ryan