Skip to content

Commit

Permalink
Added RTL support
Browse files Browse the repository at this point in the history
References #4
Added CSSJanus and GruntCSSJanus to auto-update style-rtl.css any time
style.css is compiled.
  • Loading branch information
Carrie Dils committed Oct 30, 2014
1 parent 59cc866 commit 828e35c
Show file tree
Hide file tree
Showing 4 changed files with 1,900 additions and 10 deletions.
2 changes: 1 addition & 1 deletion assets/scss/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
@import 'tables';
@import 'lists';
@import 'flashes';
@import 'buttons';
@import 'buttons';

This comment has been minimized.

Copy link
@GaryJones

GaryJones Oct 30, 2014

Keep a clear line at the end of every file.

23 changes: 17 additions & 6 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,20 @@ module.exports = function(grunt) {
}
},
/**
* Grunt-CSSJanus
* CSSJanus
*/
grunt-cssjanus: {
cssjanus: {
theme: {
options: {
swapLtrRtlInUrl: false
},
files: [
{
src: 'style.css',
dest: 'style-rtl.css'
}
]
}
},
/**
* Watch
Expand All @@ -63,10 +74,10 @@ module.exports = function(grunt) {
'assets/scss/**/*.scss',
'assets/scss/**/**/*.scss'
],
tasks: ['sass']
}
grunt-cssjanus: {
tasks: ['grunt-cssjanus']
tasks: [
'sass',
'cssjanus'
]
}
}
});
Expand Down
Loading

1 comment on commit 828e35c

@GaryJones
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's missing is now telling WP that you want WP to use style-rtl.css, and not style.css, when $is_rtl is true. See Brady's article, as that has a simple way of doing it.

Please sign in to comment.