Problem/Motivation
Can you tell which language this switcher is set to?
Neither do I. The problem is the language switcher uses theme_links() (AKA ul.links), and this nicely works with active classing on the items, *however*, there is no active styling on the item. So even though you have a list of links, you have the active one, it is not properly styled.
Proposed resolution
Provide active styling for the a.active in ul.links. Or convert the language selector to a ul.menu.
Remaining tasks
User interface changes
Active class properly styled (same colour as menu style):
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#1 | active-class.patch | 397 bytes | Gábor Hojtsy |
#1 | Welcome to s081ffd522ea3f80.s3.simplytest.me | s081ffd522ea3f80.s3.simplytest.me 2013-12-11 18-02-07.png | 11.71 KB | Gábor Hojtsy |
active-class.patch | 399 bytes | Gábor Hojtsy | |
Drupal8LanguageSwitcher 2013-12-11 17-50-42.png | 32.77 KB | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyAdding after image :) Also fixing CSS whitespace.
Comment #2
Wim LeersFYI: the
ul > li
elements also get theactive
class.\Drupal\language\Tests\LanguageSwitchingTest
even has test coverage for that!If you're sure this is what you want, I'd be happy to RTBC this — it's a super trivial patch :)
Comment #3
Gábor HojtsyIt is the same style ul.menu a.active has ~10 lines above :) I think this is what we want. That also has the style on the link not the list item. Otherwise hard to ensure link coloring properly AFAIS.
Comment #4
Wim LeersAlright :)
Super trivial patch, so RTBC.
Comment #5
webchickOh yay! Thanks. :) This came up in the D8 demo I did the other day.
Committed and pushed to 8.x. Thanks!
Comment #6
Gábor HojtsyYay, now I can tell which part of the site I am on :)