Topic on Extension talk:TemplateStyles

Variables in Sanitised CSS

4
Summary by Minoa

Variables in Sanitised CSS are not possible yet, but keep an eye on the developments of phab:T200632.

Minoa (talkcontribs)

Thanks to @Tgr, I am now able to create CSS-based backgrounds from my pre-approved repository of images.

But this has me thinking: instead of defining the 605 rules for each banner, and risk slowing down my wiki, could it be possible to pass variables from the template to the relevant CSS rule, so that I do not need to wrestle with $wgForeignFileRepos?

Anomie (talkcontribs)
Tgr (talkcontribs)

Do you really have six hundred different rules for every banner?

Minoa (talkcontribs)

As a draft, yes, but obviously not implemented due to concerns with loading times. The variable part of the file names for banners consist of a letter prefix and a number (e.g. L1 or TV2). I will be keeping an eye on T200632.