Page 1 of 1

CSS ID for game being played to allow CSS to be applied only to a specific game?

Posted: 06 November 2019, 17:16
by flicky1984
I have created some CSS modifications to transform Koi-Koi into a more traditional style.

https://boardgamearena.com/forum/viewto ... 986#p50986

I would like my CSS to apply only to the Koi-Koi game page, but I cannot find an ID that says what game is being played?

It would be great if a CSS ID containing the name of the game being played could be added to one of the top level elements of the page.

This would allow CSS to be applied only to a specific game.

Thanks for your consideration.

Reported as: https://boardgamearena.com/bug?id=13845

Re: CSS ID for game being played to allow CSS to be applied only to a specific game?

Posted: 06 November 2019, 21:13
by RicardoRix
In the game Madeira I found this in <head>:

<meta property="og:title" content="Madeira">

Is that what you mean?

Can you use the url at all?

Re: CSS ID for game being played to allow CSS to be applied only to a specific game?

Posted: 07 November 2019, 13:40
by flicky1984
Sadly not. That meta element and the URL are not accessible through CSS.

They would require custom JavaScript to get at, which BGA Advanced Preferences does not cater for.

However, if that "Madeira" value could be added to the CSS of the body tag, for example, that would be ideal.