Automattic/_s — pull request #563 by andy-saint (2014-08-12 07:27:03+00:00)
Title: Added RTL mixin

This mixin allows you to put your RTL code within the main stylesheet, rather than in a separate one, by taking advantage of the 'dir' attribute added by Wordpress via the 'language_attributes()' function.

I previously used the 'rtl' class that Wordpress adds to the body, but this makes it easier to target all elements on the page including the body tag.

As an example

```sass
body {
@include rtl {
direction: rtl;
unicode-bidi: embed;
}
}
```

compiles as

```css
html[dir="rtl"] body {
direction: rtl;
unicode-bidi: embed;
}
```

But you can use it for other things, like floats or alignments like

```sass
.comment {
.avatar {
float: left;
@include rtl {
float: right;
}
}
}
```

compiles as

```css
.comment .avatar {
float: left;
}

html[dir="rtl"] .comment .avatar {
float: right;
}
```