This ticket is made to track and coordinate the work done in Wikimania 2019 to clean up Mediawiki:Common.css of wikis by using [[https://www.mediawiki.org/wiki/Extension:TemplateStyles|TemplateStyles]] to improve performance of wikis.
---
**How to guide for interface admins:**
- Look at Mediawiki:Common.css of your wiki, check CSS rules that are only there because of very small number of templates. For example `.treeview` in English Wikipedia is mostly for [[https://en.wikipedia.org/wiki/Template:Tree_list|Template:Tree_list]]
- Make a sub page of the template, like [[Template:Tree_list/styles.css]], protect if needed
- Invoke the styles in template, for example, if you need it in template, [[https://www.wikidata.org/w/index.php?title=Template:Tree&diff=prev&oldid=966428728| This is an example]]. If you want to add it to the module, [[https://www.wikidata.org/w/index.php?title=Module:Tree&diff=967822556&oldid=793746057|here's another example]].
- Remove it from Mediawiki:Common.css
**Important points to consider:**
- This goes both ways and can cause performance regressions if you move templates that are basically used in most of page views.
- Example of things that can be moved: Styles of dmbox (disambiguation pages), tree view, quote, imbox, cmbox, etc.
- Example of things that should not be moved: Navbox, Reflist.
- Make sure the class is only used in the fixed templates. Some times might copy and need the styles too.
- This only works inside the content part of page, if you have things for header of the main page for example, this won't work :(
- You might need to do a workaround if the template is used in edit notices.
- It won't inject the CSS if the template is not loaded, so things like .hlist has to stay.
Shopping list:
List of wiki's that need fixing and who is claiming it. Tick the box if it's claimed and the CSS has been cleaned up.
[] ...