Topic on Skin talk:Minerva Neue

site specific CSS added via JS rather than <link>

3
Tlgonline (talkcontribs)

As stated on the extension page, "MediaWiki:Mobile.css (for mobile mode) or MediaWiki:Common.css (for desktop mode) will be loaded."

In Vector skin (desktop mode), the site specific CSS set forth in MediaWiki:Common.css is loaded via a <link rel="stylesheet" . . . >.

In MinervaNeue skin (mobile mode), the site specific CSS set forth in MediaWiki:Mobile.css is loaded via JavaScript.

I use site specific CSS to hide certain elements on my MW 1.35.0 installation. This works without any problem in Vector skin (desktop mode). However, in MinervaNeue skin (mobile mode) the page is rendered in full, then a second or so later the "hidden elements" disappear and the page abruptly shifts into the desired appearance. Obviously, this is not optimal.

First, can you tell me why site specific CSS is implemented this way in MinervaNeue skin (mobile mode)?

Second, can you recommend any workaround short of modifying the MinervaNeue skin code and inserting my site specific CSS directly into an appropriate source file?

157.131.72.208 (talkcontribs)

If you are using MobileFrontend you need $wgMFSiteStylesRenderBlocking = true

Minerva when used as desktop skin should load MediaWiki:Minerva.css without any problem.

Tlgonline (talkcontribs)

Thanks for the quick response. I made the recommended change and it works as stated.

I had previously read the MW 1.35 Mobile Frontend documentation (including the README.md file) but the phrase "render blocking" was too obtuse for me to understand the effect of $wgMFSiteStylesRenderBlocking.

Reply to "site specific CSS added via JS rather than <link>"