MediaWiki talk:Gadget-site.css

= 2020 =

Code direction
Hello. Codes in rtl languages like Persian are broken because the right-to-left structure is applied to them. By adding this command, you can prevent the codes from being right-aligned so that their readability is not lost: pre, code { direction: ltr } Thanks. Alireza Ivaz (talk) 07:35, 10 September 2020 (UTC)
 * The above code won’t work. ResourceLoader “helps” by flipping directions in right-to-left languages, so the above code will be transformed into  if the user interface language is RTL. This function can be disabled, luckily:   —Tacsipacsi (talk) 11:27, 13 September 2020 (UTC)

Add style for
Add the following style to MediaWiki:Gadget-site.css for consistency: See also --Shirayuki (talk) 22:53, 16 October 2020 (UTC)


 * All of the styling for that template really should be moved into TemplateStyles rather than adding yet more bloat to every page. I'd rather we didn't do this. Jdforrester (WMF) (talk) 17:07, 18 November 2020 (UTC)

= 2021 =

Infobox
Working spot for tracking all the uses of infobox and infobox like things and wondering if it's time for MediaWiki wiki to bow to the superior name for generic infoboxes (would help mobile use).

Uses infobox:


 * 1) Toolserver:Template:Tool
 * 2) User:Brigante mandrogno
 * 3) User:Andri Dariel
 * 4) User:Hoo User Page Bot
 * 5) User:Xtian~mediawikiwiki
 * 6) User:MBisanz (not gonna deal)

Used infobox and converted to Template:Sidebar:


 * 1) Template:ResourceLoader navigation
 * 2) Template:Development policy
 * 3) Template:GitLab Navigation
 * 4) Template:Deprecation policies

Uses tpl-infobox:


 * 1) Template:API-head
 * 2) Template:Wikimedia engineering project information
 * 3) Template:Project
 * 4) Template:Snippet
 * 5) Template:Tool
 * 6) Template:RFC
 * 7) Template:Skin
 * 8) Template:Extension

Uses ext-infobox


 * 1) Template:Extension
 * 2) Template:Tool

Uses ext-status


 * 1) Template:Extension
 * 2) Template:Skin
 * 3) Template:Tool

Uses skin-infobox


 * 1) Template:Skin
 * 2) Template:Tool

Izno (talk) 21:28, 19 May 2021 (UTC)

Ok, ER for .infobox is up. Now to decide how to deal with the rest of the mess. --Izno (talk) 05:15, 20 May 2021 (UTC)

Yes, mobile does (and probably others), but we already had another class doing .infobox work, which is .tpl-infobox, which at least I've got all the infobox templates that reference a class referencing as above. What I have been thinking we should do is remove the .infobox styles in Common.css and then whenever I decide what we should do about not having a template called "infobox", we move all the templates above to use .infobox along with TemplateStyles. But either way, the current class definitions in this file are going to make testing a sad day.

I think there's probably good reason to have that template now to hold the styles, even just a basic wikitext version, so we can also handle small resolutions etc. And maybe get consistent infoboxes, Idk. This wiki confuses me that there has been so much "I want my special styles"-isms (and the lack of an infobox template is one), and the fact that Template:Sidebar isn't used more, and and.... --Izno (talk) 19:41, 26 May 2021 (UTC)

Hlist
✅ hlist on this wiki is predominantly inside Template:Navbox (like en.wp) or has already migrated to flatlist. While it would be easy to move the navigation templates to use flatlist instead, it should probably follow en.wp's plan (er, my plan :D) to make navbox auto-load hlist styles if/when necessary automatically in Navbox, both as a testing ground and to avoid diverging modules.

Navboxes:


 * Template:ProofreadPage
 * Template:Pylanguage
 * Template:MirrorTools
 * Template:Flatlist
 * Template:MediaWikiFarm navigation
 * Template:Inline tags
 * Template:Help
 * Template:Extension-Narayam
 * Template:MWUnit navigation
 * Template:Hackathons
 * Template:MediaWiki notification systems
 * Template:PhpTags navigation
 * Template:Global templates nav
 * Template:Cargo navigation
 * Template:Robot policy
 * Template:Page Forms navigation
 * Template:Engineering Community Team
 * Template:Social tools
 * Template:Watchlists navigation
 * Template:Wikimedia extension database tables
 * Template:Log events
 * Template:CS cat header
 * Template:Databases
 * User:SolidBlock

Remaining users:
 * Module:List
 * Module:Navbox
 * Module:Navbar

For hlist:


 * 1) When navbar isn't present
 * 2) * it will carry its own hlist Templatestyles tag and we can avoid outputting another in an arbitrary place
 * 3) And hlist is detected in any class attribute
 * 4) Insert the templatestyles tag into the first cell in the template
 * 5) * This may not be the title or even a group cell.

It looks like we always open a div in which we can insert the templatestyles immediately. Always. Yayy

Plainlist
✅ Migrated to plainlist in most cases. Remaining users:


 * Module:List
 * Module:Navbox

Its use in the navbox case should be similar to hlist, except without the check for navbar:

When plainlist is detected in any class attribute, insert the templatestyles tag into the first cell in the template
 * This may not be the title or even a group cell.

Navbox
✅ Implementation on MediaWiki wiki probably should be generic like en.wp plans to be.

Remove .plainlist
Remove from MediaWiki:Gadget-site.css. Plainlist only exists in TemplateStyles form now, either from plainlist or invoked directly by Module:Navbox. --Izno (talk) 23:50, 29 May 2021 (UTC)

Remove .hlist
Remove from MediaWiki:Gadget-site.css. Hlist only exists in TemplateStyles form now, either from flatlist or from Module:Navbox and Module:Navbar. --Izno (talk) 23:50, 29 May 2021 (UTC)

Remove .infobox
Only one use and I don't want to disturb an active user; other uses replaced or false positives. Remove from MediaWiki:Gadget-site.css to 342. Template:Wikimedia engineering project information may need a translate admin to approve change for that template. --Izno (talk) 05:15, 20 May 2021 (UTC)
 * hmm. it's completely out of use ? I know that mobile uses this as a classname to identify infoboxes, it probably should be added as a classname to specific types of infoboxes as a semantic class honestly.. Not sure on the impact fo that. —Th e DJ (Not WMF) (talk • contribs) 12:17, 26 May 2021 (UTC)
 * See above. --Izno (talk) 19:42, 26 May 2021 (UTC)

Remove .navbox
Live occurrences have been removed (barring translation bots and job queue) as a result of this edit. Navbox is now templatestyled. Remove from MediaWiki:Gadget-site.css. --Izno (talk) 23:50, 29 May 2021 (UTC)

Remove code convention borders
Shipped to Template:Code convention example and replaced where used. Remove from MediaWiki:Gadget-site.css. --Izno (talk) 20:32, 26 May 2021 (UTC)

Remove ambox-compact
There are no cases of ambox-compact in the wild on this wiki. Remove from MediaWiki:Gadget-enwp-boxes.css to the end. --Izno (talk) 02:25, 3 June 2021 (UTC)

Remove dmbox
I have shipped the only instance of .dmbox to Template:Disambiguation/styles.css. Remove from MediaWiki:Gadget-enwp-boxes.css. --Izno (talk) 00:36, 3 June 2021 (UTC)

Remove hide-prefix in js
hide-prefix is used nowhere on wiki nor in the software. Remove from MediaWiki:Gadget-site.js. --Izno (talk) 00:57, 5 June 2021 (UTC)

Remove .mainpage in js
Of the 6 references to .mainpage, 5 are old copies of Common.css (which has a MediaWiki-supported solution these days employed as today) and 1 is a copy of an offwiki Common.css. Language versions of the main page are unaffected as they do not register as main pages. Remove from MediaWiki:Gadget-site.js.

This may also speak to a need for one or another changes: --Izno (talk) 15:49, 7 June 2021 (UTC)
 * Target rootpage-MediaWiki instead of page-MediaWiki in site.css. That would hit these pages also.
 * Improve Translate extension to identify language subpages of the canonical main page as main pages also such that page-MediaWiki is added to the translated main pages.
 * Possibly, there should be a page--main-page added by core to enable language CSS from the other direction.
 * And/or associated MediaWiki:MainPage.css so the main-page specific CSS can be taken out somehow.