How can I add a proprietary CSS class to the body element of the user that is being masqueraded?
I would like to have this functionality so that I can show messages that are usually hidden for a regular user so that I can see what's going on without the need of diving into the CSS in the Web Inspector of my browser.
Much obliged.
Comments
Comment #2
avpadernoComment #3
ressaIn an attempt to help the maintainers, I am going through some of the Drupal 7 issues, since it's EOL ... So thanks for making this request @bassplaya, is it still relevant for 2.x in Drupal 11?
Comment #4
bassplaya commented@ressa, too long ago. I’m not sure if I ever have used it assuming this feature had been added.
Comment #5
ressaThanks for a fast feedback, let's close it then.
I added the current language as a custom CSS class to my multilingual site arst.dk in Drupal 10 (Drupal's multilanguage support is spectacular) via Twig templates. First define the variable in a custom module:
... then use in custom theme file
html.html.twiglike this, adding for examplelang-fr:Good luck with the English teaching!