Skip to content

Commit

Permalink
fixes tylertate#90: supporting right-to-left languages when "dir" att…
Browse files Browse the repository at this point in the history
…ribute is present on a parent element and set to "rtl" (LESS only)
  • Loading branch information
Dave Lockhart committed Feb 23, 2015
1 parent 22e0e79 commit 9b3abba
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion stylesheets/less/grid.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,21 @@ body {
margin: 0 @total-width*((@gutter-width*.5)/@gridsystem-width);
// *width: @total-width*((((@gutter-width+@column-width)*@x)-@gutter-width) / @gridsystem-width)-@correction;
// *margin: 0 @total-width*((@gutter-width*.5)/@gridsystem-width)-@correction;
[dir="rtl"] & {
float: right;
}
}
.push(@offset:1) {
margin-left: @total-width*(((@gutter-width+@column-width)*@offset) / @gridsystem-width) + @total-width*((@gutter-width*.5)/@gridsystem-width);
[dir="rtl"] & {
margin-left: @total-width*(((@gutter-width*.5)/@gridsystem-width)*-1);
margin-right: @total-width*(((@gutter-width+@column-width)*@offset) / @gridsystem-width) + @total-width*((@gutter-width*.5)/@gridsystem-width);
}
}
.pull(@offset:1) {
margin-right: @total-width*(((@gutter-width+@column-width)*@offset) / @gridsystem-width) + @total-width*((@gutter-width*.5)/@gridsystem-width);
}
[dir="rtl"] & {
margin-left: @total-width*(((@gutter-width*.5)/@gridsystem-width)*-1);
margin-right: @total-width*(((@gutter-width+@column-width)*@offset) / @gridsystem-width) + @total-width*((@gutter-width*.5)/@gridsystem-width);
}
}

0 comments on commit 9b3abba

Please sign in to comment.