This may be more of a documentation piece, but it really needs to be out there. There have been no core issues on it that I can find, nor do I see this practice documented anywhere.

Example:
system.menus-rtl.css still loads even if system.menus.css is disabled in .info file when viewing in rtl mode (tested using arabic).

adding..
stylesheets[all][] = system.menus-rtl.css
..to the .info file resolves this.

The good news is, the RTL's loading are not affected by this bug that took a long time to squash #967166: Content rendered via AJAX does not respect stylesheets removed in .info files

Steps to reproduce:

  • Enable locale module
  • Visit /admin/config/regional/language
  • Click add language and select a RTL language (I chose Arabic)
  • Set your chosen RTL language as the default, save and close the overlay
  • Inspect any collapsed element and see that system.menus-rtl.css is loading

Screenshots to back up the find:

screenshot with only stylesheets[all][] = system.menus.css in .info (Stark):
LTR disabled

screenshot with both files in .info (Stark):

stylesheets[all][] = system.menus.css
stylesheets[all][] = system.menus-rtl.css

LTR and RTL disabled

This issue was originally discovered in the Zen issue queue (by me), just getting around to testing it in core.
#1617996: RTL files still load even when removed via .info file

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

KrisBulman’s picture

Issue summary: View changes

text formatting

KrisBulman’s picture

Issue summary: View changes

added link to original ticket

KrisBulman’s picture

Issue summary: View changes

text formatting

KrisBulman’s picture

Status: Active » Closed (duplicate)

Looks like this is a dup, comment #74 in #575298: Provide non-PHP way to reliably override CSS Jacine states we still have to manually deal with RTL files.

JohnAlbin’s picture

Priority: Normal » Major
Status: Closed (duplicate) » Active

You are misreading her comment:

This patch also fixes this sort of stupidity in hook_css_alter(), because you need to manually deal with RTL CSS files right now:

She is describing a bug, not a by-design feature. If you remove the main stylesheet in a .info file, OF COURSE, you want the RTL removed as well. You don't have to add RTL stylesheets via .info file; you shouldn't have to remove them either.

Also, RTL stylesheets have been removed from D8, so this can be fixed in D7 straight away.

KrisBulman’s picture

Thanks for clarifying this John!

KrisBulman’s picture

Issue summary: View changes

moved text block up front