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

Suggestions & ideas / Suggestions & idées
Locked
User avatar
flicky1984
Posts: 12
Joined: 05 November 2019, 11:35

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

Post 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
Last edited by flicky1984 on 07 November 2019, 13:41, edited 1 time in total.
User avatar
RicardoRix
Posts: 2541
Joined: 29 April 2012, 23:43

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

Post 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?
User avatar
flicky1984
Posts: 12
Joined: 05 November 2019, 11:35

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

Post 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.
Locked

Return to “Suggestions”