Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
RTL major refactor (#5055)
Browse files Browse the repository at this point in the history
* Issue #4261 - part 1 - inject "dir=rtl" to <html> tag in case of RTL languages
  * Use CSS Logical Properties and Values
  * Fixed order of arrows for pagination
  * Generating .rtl.css and .ltr.css files for non-Firefox and Chrome browsers
  • Loading branch information
yehudab authored and ianb committed Oct 30, 2018
1 parent 3639661 commit ec6aeae
Show file tree
Hide file tree
Showing 25 changed files with 5,015 additions and 3,888 deletions.
7 changes: 7 additions & 0 deletions .postcss/ltr/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const postcssLogical = require('postcss-logical');

module.exports = {
plugins: [
postcssLogical({"dir": "ltr"})
]
}
7 changes: 7 additions & 0 deletions .postcss/rtl/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const postcssLogical = require('postcss-logical');

module.exports = {
plugins: [
postcssLogical({"dir": "rtl"})
]
}
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ server_dest := $(server_source:server/src/%.js=build/server/%.js)

# Also scss gets put into two locations:
sass_source := $(wildcard static/css/*.scss)
sass_server_dest := $(sass_source:%.scss=build/server/%.css)
sass_server_dest := $(sass_source:%.scss=build/server/%.css) $(sass_source:%.scss=build/server/%.ltr.css) $(sass_source:%.scss=build/server/%.rtl.css)
partials_source := $(wildcard static/css/partials/*.scss)

# And static images get placed somewhat eclectically:
Expand Down Expand Up @@ -61,6 +61,12 @@ build/%.css: %.scss $(partials_source)
@mkdir -p $(@D)
node-sass $< $@

%.ltr.css: %.css
postcss $< -o $@ --config .postcss/ltr

%.rtl.css: %.css
postcss $< -o $@ --config .postcss/rtl

## Static files to be copied:

build/%.png: %.png
Expand Down
Loading

0 comments on commit ec6aeae

Please sign in to comment.