On Sat, Sep 16, 2017 at 7:46 AM, Brian Wolff bawolff@gmail.com wrote:
What you are looking for is TemplateStyles. This is not enabled on english wikipedia yet, but should be coming there soon (I think). It would allow you to use @media styles for your pages. See https://www.mediawiki.org/wiki/Help:TemplateStyles for more details.
Templatestyles does not let you use css variables (the properties starting with -- and the var() css function), but the example css you used could easily be rewritten to not use that feature.
You could also just put it into User:Kaartic/common.css and wrap it in a .page-User_Kaartic selector, that is less restrictive.