theme_bootstrap
theme_bootstrap copied to clipboard
A script to generate RTL CSS to append
This probably needs a fair bit more work. But in case anyone else wants to have a look at it.
It's just a bunch of shell scripts doing stuff with regexes, so it's a bit fragile.
Note, don't actually commit the config change as-is, that's just to show what you need to do for the output to work in Moodle.
I'm not sure how to set that dynamically (look for a single RTL language being installed?). At the moment you need to comment/uncomment and reload the styles.
Will this prevent non-Linux developers from compiling the CSS?
It's fundamentally a bunch of of regex replaces, sed just happened to be the easiest tool for prototyping. If it becomes part of the workflow then something in nodejs for grunt is probably the most appropriate thing.
The svg scripts where originally done in sed for example.
However, I'm waiting to see what Bootstrap upstream do. One of the 3rd party RTL developers suggested that theyshould abandon RTL in core. The argument made absolutely no sense to me, but its possible they decided to follow that advice.
I've realised this could be simplified a fair bit if I used [dir="rtl"] rather than .dir-rtl on body to target the RTL rules. It looks like Moodle puts the dir attribute on the HTML tag so anyone know why Moodle CSS uses the latter? Just for historical reasons?
Ours is not to reason why but to do and code.
http://about.me/gjbarnard
On 3 June 2014 12:42, David Scotson [email protected] wrote:
I've realised this could be simplified a fair bit if I used [dir="rtl"] rather than .dir-rtl on body to target the RTL rules. It looks like Moodle puts the dir attribute on the HTML tag so anyone know why Moodle CSS uses the latter? Just for historical reasons?
— Reply to this email directly or view it on GitHub https://github.com/bmbrands/theme_bootstrap/pull/273#issuecomment-44953817 .
css-flip has been updated, so is this better / worse?
Ref: https://www.npmjs.org/package/grunt-css-flip