This patch fixes wrong usage of /* RTL */ comments in css files

CommentFileSizeAuthor
wrong-use-of-RTL-comments.patch1.23 KBmunzirtaha

Comments

Jeff Burnz’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, nice cleanup.

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Could you explain this a bit more? Why are those incorrect usages of RTL? The preview image is on the left side on left-to-right languages to ease in scanning. I would assume that in RTL languages you want them on the right side as a result. No?

munzirtaha’s picture

Status: Needs review » Reviewed & tested by the community

Yes, sure. The problem is the comments are wrong or redundant. e.g. In the default image.css: float: left; /* RTL */
This above line should read
float: left; /* LTR */ which means this is the original default css file and this rule is for LTR languages and you need to reverse it in the corresponding *-rtl.css

As mentioned at http://drupal.org/node/302199:
As a rule of thumb, add a /* LTR */ comment in your style ....

All the files are sticking to this rule except the ones I fixed. In other words we should put the comment /* LTR */ in the default file not the word /* RTL */ and it's just a convention that all the other files follows, nothing special.

Another issue that's fixed with the patch is the comments in the *-rtl.css files. Those files are for RTL languages, so no need to put a comment saying /* RTL */ on them. We already know that. Thanks for your review.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Oh, wait. I get it. So according to http://drupal.org/node/132442#language-rtl the actual string should be *LTR* instead of *RTL*, and should only appear in the non- *rtl.css stylesheet.

Committed to HEAD. Is that the only place we got this wrong though? I confess I've thought it was the other way the whole time, so I've likely committed patches that have introduced this. :\ Sorry. :\

webchick’s picture

Oops. Cross-post. Thanks for the more detailed explanation! :)

Status: Fixed » Closed (fixed)

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