theme_bootstrap icon indicating copy to clipboard operation
theme_bootstrap copied to clipboard

A script to generate RTL CSS to append

Open davidscotson opened this issue 10 years ago • 6 comments

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.

davidscotson avatar May 20 '14 09:05 davidscotson

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.

davidscotson avatar May 20 '14 09:05 davidscotson

Will this prevent non-Linux developers from compiling the CSS?

gjb2048 avatar May 25 '14 16:05 gjb2048

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.

ds125v avatar May 25 '14 17:05 ds125v

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?

davidscotson avatar Jun 03 '14 11:06 davidscotson

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 .

gjb2048 avatar Jun 03 '14 11:06 gjb2048

css-flip has been updated, so is this better / worse?

Ref: https://www.npmjs.org/package/grunt-css-flip

gjb2048 avatar Jul 27 '14 23:07 gjb2048