Posted by mohammed76 on August 21, 2008 at 5:45am
Jump to:
| Project: | Jcss RTL css Files |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hi.
Anybody working on porting this module to drupal 6? since it's just a utility, and since 5.x is still maintained, this may be of a less important issue.
Comments
#1
Hi
Drupal 6 RTL css method is completely changed, for more information see http://drupal.org/node/145737
so this module will not produce the right RTL css file,
drupal 6 method is more complicated to automated
you can use this module to see changes in the css file and apply those changes manually in right method
#2
Hi Avior,
can we rethink that ? as I see you *have* created a D6 port for this module.
I am not a developer but I have played around with this (awsome) module and I think it *can* do a better job with preparing the rtl file(s) for D6 (and 7, why not ?)
This is how I see it :
* The module already identifies the lines that needs overrides, and does a good job doing that (compared to other modules).
* It already adds comments to these lines.
So IMO what we need is double output field -
* The first will give *the same* CSS with only /* LTR */ comments on the identified lines, this output will be saved as the LTR css file.
* The second will give only the flipped lines, no need for comments here, this will be saved as the RTL file.
the only problem left is that e.g. margin-left: 10px will not cancel the margin-right: 10px that was in the original LTR css, but that is a different issue that can be handled manually if there's no other choice, or it can even add margin-left: 0 to the RTL style.
Is that even doable ?
#3
Hi Tsi
Yes, I have created a drupal 6 version of this module, but the main issue is that this module does not do it "The drupal 6 way", it's just drupal 6 core compatible
the way this module works is that it copies the css file lines line by line , and check for the "RTL" commands and flip them ,
so as i can see there 2 issues with method you are suggesting
1. not all the themers add LTR remarks in the code, so i don't believe that relaying on this method alone is good practice , maybe as one of the options, from my experience most of the css commands (i.e right:XX) should be RTLed
2. there is a need to catch the full css item (i mean from { to }) ,
and parse each line inside (and copy only the lines with the LTR remark), so this is changing all the regex commands , that are not simple as you can see
so not sure that this is possible, anyway this is complex ,
I would love getting help /patches to see if this is possible
#4
Hi Avior,
This is not exactly what I was suggesting, quote :
So I wasn't relying on the theme authors to add LTR comments (actually I was assuming they didn't).
About your second point, it makes sense but I see that the module *already* adds comments to (and only to) the flipped lines so I figured that if they are already identified this well we can also manipulate them in a more D6 way. I assumed that it wouldn't be too hard to keep *only* the lines that need RTL overrides as they were already identified in the first step.