CSS selector for CURRENT USER or LEVEL?

(BenFranklin!) #1

In Wordpress a bunch of user-specific info gets inserted into a class in the tag to make selective styling based on the currently-logged in user possible.

You can have one style sheet but have different styles as you target “.subscriber1 div”

Matomo doesn’t seem to have this in the HTML. Any other solutions? Am I missing something?

(Lukas Winkler) #2


Are you referring to creating a Matomo Plugin/Theme?

The only way I can think about it at the moment would be writing the CSS depending on a class and then adding the class via JS if the user is logged in.

(BenFranklin!) #3

Yes, I created my own theme and I was hoping I could just write CSS that is based on core selectors outputted by default by Matomo to identify a user or user level like in Wordpress.

If Matomo doesn’t do this I guess I will have to figure out how to write in some PHP or JS to conditionally output this CSS for specific users. Too bad. Conditional CSS seems like it would be a common need for all though – at least if people started writing a bunch of custom themes but I also suspect many Matomo users are just pretty cool with the default admin.