Closed (fixed)
Project:
Zen
Version:
6.x-1.1
Component:
CSS/HTML Markup
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2010 at 14:53 UTC
Updated:
17 May 2010 at 08:50 UTC
Why RTL works on 6.x.1.1 without even having RTL style sheet?
Comments
Comment #1
johnalbinI don't understand the question. You'll need to explain what you did, what you expected, and what you experienced.
Comment #2
lameei commentedAs you may know in an RTLized theme we expect the direction of the content to be RTL, So when you create content at the content creation page the text have the RTL direction. In Drupal this happens by calling the style-rtl.css file if you enable an RTL language. So there is a function in template.php which checks the language of the website and decides if there is a need for calling the style-rtl.css file. Zen does not have such a mechanism, So we should not be able to create an RTL content , But we CAN. if you enable an RTL language at the content creation page the text aligned right and Also has the RTL direction.
I digged the code using firebug but i got no clue of the way it happens. I'm looking for the reason of this.
Comment #3
johnalbinYou've misunderstand the mechanism slightly. Drupal uses drupal_get_css() to add a theme's stylesheets to the <head> of the page. And, if the current language is RTL, that function will, for each stylesheet, look for a correspondingly-named -rtl stylesheet and load it too.
So, no themes need to handle loading the RTL stylesheets; they just need to have -rtl stylesheets.
Comment #4
lameei commentedThanks for correcting me. But there is no RTL style sheet in my zen sub theme and it acts correctly with RTL langs. how does this possible?
Comment #5
portulacaCheck your page source, it loads rtl sheets from the modules dirs, doesn't it?
Comment #6
lameei commentedMany thanks for the complete description. It helped me much.