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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Adding after image :) Also fixing CSS whitespace.

Wim Leers’s picture

FYI: the ul > li elements also get the active 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 :)

Gábor Hojtsy’s picture

It 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.

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

Alright :)

Super trivial patch, so RTBC.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Oh yay! Thanks. :) This came up in the D8 demo I did the other day.

Committed and pushed to 8.x. Thanks!

Gábor Hojtsy’s picture

Issue tags: -sprint

Yay, now I can tell which part of the site I am on :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.