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):
screenshot with both files in .info (Stark):
stylesheets[all][] = system.menus.css
stylesheets[all][] = system.menus-rtl.css
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
Comment | File | Size | Author |
---|---|---|---|
system.menus-rtl-disabled.png | 459.4 KB | KrisBulman | |
system.menus-rtl-enabled.png | 455.54 KB | KrisBulman |
Comments
Comment #0.0
KrisBulman CreditAttribution: KrisBulman commentedtext formatting
Comment #0.1
KrisBulman CreditAttribution: KrisBulman commentedadded link to original ticket
Comment #0.2
KrisBulman CreditAttribution: KrisBulman commentedtext formatting
Comment #1
KrisBulman CreditAttribution: KrisBulman commentedLooks 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.
Comment #2
JohnAlbinYou are misreading her comment:
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.
Comment #3
KrisBulman CreditAttribution: KrisBulman commentedThanks for clarifying this John!
Comment #3.0
KrisBulman CreditAttribution: KrisBulman commentedmoved text block up front