When setting a custom path to a style sheet (say print.css) and in the same path exist also an rtl style sheet (say print-rtl.css) the last should be also called when the site is viewed in an rtl language.
Furthermore I believe these style sheets should be looked for automatically (like the template files) instead of being specified manually.

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

If you're specifying your own custom stylesheet, then of course they have to be specified manually. Further, since you're specifying them, you can make them RTL yourself.

tsi’s picture

Status: Postponed (maintainer needs more info) » Active

We build a lot of sites that are bi-directional, that means that they are multi-lingual and go ltr when user choose an ltr language and switch to rtl when the user chooses an rtl language.
The default drupal behavior (with drupal_add_css) is :

If the direction of the current language is right-to-left (Hebrew, Arabic, etc.), the function will also look for an RTL CSS file and append it to the list. The name of this file should have an '-rtl.css' suffix. For example a CSS file called 'name.css' will have a 'name-rtl.css' file added to the list, if exists in the same directory. This CSS file should contain overrides for properties which should be reversed or otherwise different in a right-to-left display.

This way we don't have to choose between ltr and rtl - we can have them both.

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Yes, and as I said, if you don't specify your own CSS file, that drupal_add_css() call is made.. My question is: have you specified your own CSS file?

tsi’s picture

Yes, and then this custom CSS file is loaded, witch is fine for uni-directional site, but it's not enough for a multilingual, bi-directional site.

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Active

In a previous version, the stylesheet could be located anywhere (including other sites), which is why that particular CSS doesn't use drupal_add_css() as this call requires that the file is located in the local server.

However, since a few releases ago, the security team forced me to make sure that the file is located in the Drupal server, so there's no reason not to use drupal_add_css() anymore. I'll take a look into doing it soon.

jcnventura’s picture

Status: Active » Fixed

The module is now using drupal_add_css to include the custom CSS file, so the rtl version of the file will get called when needed if Drupal detects it.

João

Status: Fixed » Closed (fixed)

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