Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML5: Use HTML 'dir' attribute in CSS files #23

alexhass opened this issue Jun 28, 2013 · 3 comments


None yet
2 participants
Copy link

commented Jun 28, 2013

Next Drupal 8 (release end of year 2013) has a changed approach for integrating RTL support. See below linked case for reasons and the final committed patch in #69 that has tons of example how code need to be changed.

Remove language_css_alter() (RTL stylesheets) in favor of HTML 'dir' attribute:

Some of the key benefits are

  1. half number of CSS files (all "-rtl.css" files are removed)
  2. increases the maintainability
  3. easier SASS integration
  4. better code readability


body {
  margin: 1em;
  background-color: #fff;
[dir="rtl"] body {
  direction: rtl;

th {
  text-align: left; /* LTR */
  color: #006;
  border-bottom: 1px solid #ccc;
[dir="rtl"] th {
  text-align: right;

For the reason that the incremental files (-rtl.css) are no longer working in Drupal 8 we really need to change this. I like this change as it makes code really easier to read as the RTL comes directly after the LTR specification. No need to search around if the RTL override exists or not and so on. It's really a lot easier.


This comment has been minimized.

Copy link

commented May 8, 2015

Its great to see, that those separate files are no longer needed. I have to check where and if YAML itelf still needs much RTL related code as with YAML5 most old-IE related issues are gone and provided styling has been further reduced for prototyping. So in most cases RTL relevant styling will occur on user-basis now.


This comment has been minimized.

Copy link

commented May 15, 2015

RTL support is integrated in YAML5 in this way. There are no more any additional CSS-Files needed. RTL support can be enabled/disabled via Sass variable.

@djesse djesse closed this May 15, 2015


This comment has been minimized.

Copy link

commented May 31, 2015

Great. Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.