Childify Me doesn't create rtl.css
Opened this issue · 3 comments
Although I usually create the child-theme manually, I tried this plugin on a new RTL site and the rtl.css file was not created.
Bug?
Feature?
Hello JTS,
thanks for this.
Bug? Feature?
I think none of them :D
RTL css is something Customizr has but other themes might not have.
This plugin just creates the child-theme style.css which refers to the parent (the Template property). I don't think it should create the rtl version, why should it?
Using the child-theme, with customizr, the parent theme will load the parent rtl CSS, and the child-theme style.css where you can put your customization. If you want to completely override the parent rtl css .. well you know what to do in the child-theme, but this is beyond the purpose of this plugin.
Also Customizr knows where the rtl file is located, but a child-theme cannot know it, each theme can have or not have an rtl version and have it in different places.
The issue came up when I activated polylang, and I wanted to add different
styling to the language swithcer on both directions.
Maybe O need to look for a better solution
יעקב גלזר
בקרו באתר שלי : www.glezer.co.il
On 6 September 2015 at 21:42, Rocco Aliberti notifications@github.com
wrote:
Hello JTS,
thanks for this.
Bug? Feature?
I think none of them :D
RTL css is something Customizr has but other themes might not have.
This plugin just creates the child-theme style.css which refers to the
parent (the Template property). I don't think it should create the rtl
version, why should it?
Using the child-theme, with customizr, the parent theme will load the
parent rtl CSS, and the child-theme style.css where you can put your
customization. If you want to completely override the parent rtl css ..
well you know what to do in the child-theme, but this is beyond the purpose
of this plugin.
Also Customizr knows where the rtl file is located, but a child-theme
cannot know it, each theme can have or not have an rtl version and have it
in different places.—
Reply to this email directly or view it on GitHub
#2 (comment)
.
Ah I see what you mean.
I think you can take advantage of the fact that when rtl a body class "rtl" is added.
Also consider that creating an rtl css in the child-theme desn't mean it will be loaded. To actually load it you should write some php code in your child-theme functions.php or the parent theme should have some code to do that (and in this case a general child-theme has no way to know it, hence no clue on how to call it or where to place it).
Also the child-theme style.css is needed mainly to refer to the parent, so to say that it is a child-theme, it's not implied that it will actually contain CSS for style the website. To not consider that an rtl user might want to have a general CSS with common rules and a small rtl CSS where to add just to specific rtl rules.
So, even if an option like "create the rtl style" would be a good idea it implies that the child-theme functions.php must have php code to load it when rtl, and this means that this plugin, in this case, forces the users to follow a method IT decided. Dunno if I want to do that. I would like to keep it simple. Normal users might find this uncomfortable. Advanced users like you know what to do :)