in-the-beginning
in-the-beginning copied to clipboard
Add RTL support
Just added an rtl.css file to the in-the-beginning theme. It should be included in the same location of the theme style.css file and its name must be rtl.css. Wordpress loads this file automatically when an RTL language is detected.
Leaving this issue open - see comments on this pull request.
I am familiar with CSSJanus (and I know Yoav, the developer) but this tool does 80% of the job (at least for Genesis style sheets). I am reading the article that you sent and maybe there is a way to increase the accuracy of the output of this tool but there is no way as far as I can tell that it is going to be 100% accurate.
Some of the issues that require special attention (and probably need to do them manually):
- Rules that you do not want to convert. For example, in Genesis, there are rules for the containers (i.e. .content, .content_sidebar_wrap etc') with float: right/left. I realized (and talked about it with Nick (the geek) a long time ago) that since that the layout can be set in the admin area (Genesis -> Theme Settings), it is better to leave the css rules the same for LTR/RTL sites. As I am reading the article that you sent, perhaps it is just a matter of adding specific comments above these classes in order to direct the cssjanus plugin to not convert them (?)
2.Rules that in the rtl version are composed from different classes - for example - .genesis-nav-menu > .last > a in the ltr version: .genesis-nav-menu > .last > a { padding-right: 0; } in the rtl version: .genesis-nav-menu > .last > a { padding-left: 0; padding-right: 24px; } The padding-right: 24px; is taken from a different class....
This is not an issue if you are replacing the style.css with a RTLed css but it is an issue if you have the original ltr style sheet and the rtl style sheet (with just the required overrides).
- There is a problem with trying to use just one css for your style (if I understand what the suggestions are in the article) - I have many multi language sites - I need both the ltr and the rtl support.. Maybe I am not familiar enough with Grunt and its capabilities, but there should be a way to maintain the theme styles for multi language sites...
Next week, I am going to have a Skype call with Gary Jones about adding RTL support to genesis, If you wish to join it would be great...
Meanwhile, If you know what I should do (instead of what I have done), please advice.
Thanks much :) Nir
Thanks, Nir. I would love to be a fly one the wall for that Skype session.
You have a ton more practical experience where RTL is concerned. My hope is to automate where possible so that every LTR-related CSS change doesn't result in a manual update of the RTL styles.
Good point also about certain elements pulling styles from multiple classes. If we can improve the original styes to avoid this, by all means, I am open.