laughingwithu / flawless-semantics-grid

A grid system based on semantic.gs but with a few more options...
http://laughingwithu.github.com/flawless-semantics-grid/index.html
Apache License 2.0
28 stars 4 forks source link

right-to-left language support #29

Closed dlockhart closed 9 years ago

dlockhart commented 9 years ago

These changes add support for right-to-left languages. Unlike some grid systems that support RTL using a compile-time flag (requiring two separate compiled CSS files), this approach leverages an attribute selector that targets a parent element with the "dir" attribute set to rtl. When that attribute/value combination is present, we flip any direction-specific CSS rules (e.g. float, margin-left) to their inverse.

To use the grid system in right-to-left mode, simply add dir="rtl" to any parent element in your document:

<html dir="rtl">
</html>
laughingwithu commented 9 years ago

This looks good.