Topic on Project:Support desk

How to load alternative common.less in Vector skin

2
52.9.166.178 (talkcontribs)

I want to be able to load an alternative common.less file (common.less is part of Vector). However it's very unclear to me how the skins are loading the .less files listed in skin.json?

Is there any way to make it switch, based on the originating IP address, such that it will load common_test.less instead of common.less under certain circumstances?

83.135.226.133 (talkcontribs)

It depends on what you want to achieve:

You should not edit the files of the Vector skin as this will make updating MediaWiki harder than needed. Instead, you can use different wiki pages in your wiki to adjust the design of the wiki. These pages are named and described on Manual:Interface/Stylesheets.
You could create a wiki page named User:Example/Vector.css with "Example" replaced by your actual username. On that page you can then put styles and rules, e.g. rules for testing, which should be in effect for your account.

If the rules should during testing not only be in effect for one user, but for multiple users, I could also imagine that you create a new user group for the users, who should see the styles for testing. Let's say this group would be called "test". Then you add the according users, who should be in that group, to user group "test".
More information on how to work with user groups is on Manual:User rights!
And you create the wiki page MediaWiki:Group-test.css and put your rules there!

Reply to "How to load alternative common.less in Vector skin"