MediaWiki talk:Common.css

From Meta, a Wikimedia project coordination wiki
Please use this talk page to propose and request changes to the MediaWiki:Common.css. Use {{editprotected}} to get attention from Meta-Wiki interface administrators. If your request is not handled for some days you may leave a message in the administrators' noticeboard. Thank you.
SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 1 day. For the archive overview, see MediaWiki talk:Common.css/Archives. The latest archive is located at 2024.

I recently discovered this existed and is loaded exclusively on file pages. The styles associated with the below block are only applicable in that context. As such:

Please copy lines 50 to 61 of Common.css to MediaWiki:Filepage.css...

Done. Kind regards, Tulsi 24x7 03:09, 18 March 2023 (UTC)[reply]

And then remove them from Common.css. Izno (talk) 02:56, 18 March 2023 (UTC)[reply]

Done. Kind regards, Tulsi 24x7 03:09, 18 March 2023 (UTC)[reply]

If you found it only recently, others may also have hard time finding it and thus figuring out where the styles come from. While I agree these styles shouldn’t be in Common.css, I’d instead move them to TemplateStyles (although that’s a bit tricky in interface messages) or even inline CSS. —Tacsipacsi (talk) 10:27, 18 March 2023 (UTC)[reply]

@Tacsipacsi, if you look into the history of these styles, they were originally in the local MediaWiki message of interest and were moved to Common.css so every language interface had access to them instead of what I assume was just MediaWiki:Message(/en).
I don't think you want to create/maintain 300 some-odd interface messages just to support these styles. (Yes, the preference if you were to do something like that would be to use TemplateStyles.)
I would rather there be some education about the existence of that MediaWiki css page. I don't know the best way to do that. I personally learned about it when looking at the Commons CSS situation. At least one or two other Commons types know about it as well. It's been around since 1.18 or so, so I guess that's in the realm of a decade and change?... Izno (talk) 07:21, 19 March 2023 (UTC)[reply]
@Izno: I didn’t realize this CSS targets a class added by MediaWiki core, I assumed it was added by a customized MediaWiki message, as sharedUploadNotice doesn’t look like a CSS class used by core: it has no mw- prefix, and it uses camel case instead of kebab case. I agree that modifying hundreds of interface messages (and thus also preventing corrections to the translations) is not the way to go, so neither inline CSS nor TemplateStyles can be used.
I already knew about MediaWiki:Filepage.css on Commons, but I thought it was a Commons-specific thing (the Commons stylesheet loads not only on Commons, but also in all wikis that display file description pages from Commons, so over there, it’s not just a performance optimization thing). The education could be listing all the possible pages here in the {{process header}} template, or on a mediawiki.org help page linked from the {{process header}} template. —Tacsipacsi (talk) 11:46, 19 March 2023 (UTC)[reply]
Yeah, welcome to old class names. :) I've been checking both codesearch and local when I've been working on identifiers here.
No, it is surprisingly not Commons-specific, I think it first showed up in the search I was running on en.wp either for Module:Message box (imbox) TemplateStyling or removal of messagebox styles from Common.css, then Commons wanted some TemplateStyling help and it showed up a second time there locally. I separately confirmed before requesting a move that it does definitely load the local version of the message as CSS, though before the Commons version, which may not be desirable necessarily, but that is not a story for here.
I have no opinion on where education would best occur. It is already linked in w:Template:CSS and JS MediaWiki messages so at least it's discoverable for the random browser, but there's nothing similar here. There maybe could be? Izno (talk) 17:46, 20 March 2023 (UTC)[reply]

bidi isolation[edit]

One of the last things I think is worth looking into is the CSS at MediaWiki:Common.css#L-63. It has a note about a now-ancient patch that has been abandoned since slightly less time. The patch provides no understanding of why it was abandoned (though at least there would be a merge conflict since the file that has the related styles is now at resources/src/mediawiki.skinning/content.body.less).

Perhaps it should be removed, or a task submitted in Phabricator if something like it is still potentially useful? Izno (talk) 07:29, 19 March 2023 (UTC)[reply]

Besides this, which I don't intend to spend any time on, my work on meta is done. The other stuff in Common.css/Mobile.css might be worth a general review for desirability, but can't be moved to TemplateStyles, so it's a local community thing. Izno (talk) 23:48, 21 March 2023 (UTC)[reply]

Remove now-useless block[edit]

Back in 2012, I added some code to add an icon to the interface in Special:Translate. Since then, other interface development has happened, so those blocks are now no longer needed (and haven't been for years, in fact).

So: Please delete what is currently line 29–43. Jon Harald Søby (talk) 17:10, 13 November 2023 (UTC)[reply]

Done, thank you. --M/ (talk) 19:23, 13 November 2023 (UTC)[reply]