MediaWiki talk:Common.css

Applying a style for the Vector 2022
Hi, in Vector 2022, if we want to select title of an article and we accidentally extend the selected area to select Table of Content button with the icon, then the text copied in clipboard would wrongly be (for example for the article "Wikipedia"): This is not the intended clipboard and the first line is not required, i.e., only "Wikipedia" as the title of the article is enough and the text "Toggle the table of contents" makes the clipboard data wrong.

The solution to this problem could be applying this style: I have tested that code in my css page at User:Hooman Mallahzadeh/common.css and it prevents this behavior very well.

Finally, I should note that this unexpected behavior in clipboard functionality is frequently occurred for me both in English Wikipedia and in Persian Wikipedia. Thanks, Hooman Mallahzadeh (talk) 04:30, 2 January 2024 (UTC)


 * Please file a task upstream. You do not need to support IE. You will also want to test with an accessibility agent or two. Izno (talk) 21:31, 2 January 2024 (UTC)
 * How to file a task upstream in case you don't know how to do it: Click here, fill it out, and tag it Desktop Improvements (Vector 2022). – Novem Linguae (talk) 23:59, 2 January 2024 (UTC)
 * I made a task for it at T354235. Thanks, Hooman Mallahzadeh (talk) 05:27, 3 January 2024 (UTC)
 * @Izno@Novem Linguae The task is not resovled yet and may be not resolved in near future. But we can apply that style here. Would you please apply this styles here? Thanks, Hooman Mallahzadeh (talk) 06:19, 6 May 2024 (UTC)

Interface-protected edit request on 11 April 2024
Replace with

The default size for flag icons is 23px, so setting the min-width to 25px is causing all flag icons to be larger than they should be. This is problematic for Template:Flag data which takes advantage of the fact that 25px is 2px larger than the default size of 23px. Additionally, using 23px was the proposed fixed for T116318. – Brandon XLF  (talk) 18:43, 11 April 2024 (UTC)
 * ✅ * Pppery * it has begun... 15:36, 13 April 2024 (UTC)

Interface-protected edit request on 5 May 2024
Can you please add this to the common.css? That is the serif font, and it is the font for nearly all the encyclopedias. Additionally, it constitutes the font of an actual encyclopedia. Thank you. 143.44.165.227 (talk) 02:17, 5 May 2024 (UTC)
 * Red information icon with gradient background.svg Not done for now: please establish a consensus for this alteration before using the template. – Jonesey95 (talk) 02:52, 5 May 2024 (UTC)

Interface-protected edit request on 30 May 2024
Please remove the background on `mw-warning-with-logexcerpt.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt, div.mw-lag-warn-high, div.mw-cascadeprotectedwarning, div#mw-protect-cascadeon {` or replace it with a CSS variable that can adapt to dark mode. I am not sure why this is styled as an error, when the message itself is a warning and has a triangle - so the color is confusing so I personally would vote for removing it or moving it to MediaWiki:Timeless.css etc..

I have a global script for forcing dark mode on all pages, and when dark mode gets enabled on the editor, this will break. It would be good to fix this before that happens! Thanks in advance!

Example: https://en.wikipedia.org/w/index.php?title=Template:Sidebar_with_collapsible_lists&action=edit (with dark mode global script). 🐸 Jdlrobson (talk) 04:46, 31 May 2024 (UTC)


 * This is styled as an error because that's the importance we assign it, not the arbitrary importance assigned to it by the WMF at a date long after our modification was added. Stjn had a similar block in the ru.wp CSS which he modified to the CSS at ru:MediaWiki:Common.css, which I just haven't had a chance to test. Izno (talk) 18:52, 31 May 2024 (UTC)
 * @Izno If the goal is to style this as an error, it would be better to use the Codex design token to ensure accessibility with links etc and get the night mode equivalent for consistency:
 * While I don't think it looks great, having a warning icon with a red color, if this style needs to be retained as is, without the CSS variable, you need to also add a rule for text color - like what I'm doing in User:Jdlrobson/common.css. Without that, the interface will become unusable in dark mode.
 * 🐸 Jdlrobson (talk) 15:54, 8 June 2024 (UTC)
 * ✅ using the error-subtle design token, and keeping the existing color as fallback since the variable doesn't seem to be defined at all on Vector legacy which I use. * Pppery * it has begun... 01:35, 18 June 2024 (UTC)
 * @Pppery just following up here after feedback on https://www.mediawiki.org/w/index.php?title=Reading/Web/Accessibility_for_reading/Reporting/en.wikipedia.org#Special:Contributions_dark_mode_error . Looks like this wasn't done for warnings. That should be using --background-color-warning-subtle. Should I create a new edit request or can we do it as part of this one? Jon (WMF) (talk) 16:53, 15 July 2024 (UTC)
 * That's due to a different block of CSS than the one referred to in the initial comment here, so I likely never noticed it. Now fixed. * Pppery * it has begun... 23:15, 15 July 2024 (UTC)
 * That's due to a different block of CSS than the one referred to in the initial comment here, so I likely never noticed it. Now fixed. * Pppery * it has begun... 23:15, 15 July 2024 (UTC)

Edit request 18 June 2024
Change  to   at lines 144 and 132, as the CSS variable   does not exist.

html.skin-theme-clientpref-night .infobox a { color: var( --color-link ) !important; }

@media (prefers-color-scheme: dark) { ... html.skin-theme-clientpref-os .infobox a { color: var( --color-link ) !important; } } -> html.skin-theme-clientpref-night .infobox a { color: var( --color-progressive ) !important; }

@media (prefers-color-scheme: dark) { ... html.skin-theme-clientpref-os .infobox a { color: var( --color-progressive ) !important; } } Andumé (talk) 01:22, 18 June 2024 (UTC)
 * since you put it there I believe. Izno (talk) 01:26, 18 June 2024 (UTC)
 * I suspect what was meant was "color:LinkText", but I'll let Jon comment. * Pppery * it has begun... 01:42, 18 June 2024 (UTC)
 * Switching --color-link to --color-progressive makes sense - we've been moving away from color-link to color-progressive. Thanks for flagging this! Jon (WMF) (talk) 16:39, 18 June 2024 (UTC)
 * ✅ Writ Keeper &#9863;&#9812; 16:50, 18 June 2024 (UTC)

Pink background-color for protected pages doesn't work without CodeMirror
I am using Vector 2022, light color mode. On page MediaWiki:Group-templateeditor.css, the following CSS rule is defined to make the background of wikitext editor light pink, when the page is protected:

It works for CodeMirror (selector ), i.e. with  syntax highlighting enabled, but doesn't work when it is disabled  (selector  ). Instead, the background color is white. For example, I as a template editor see it when.

This is caused by having   in its inline style attribute in combination with.

Tag in this case also has CSS class   which comes from mw:Extension:WikiEditor (found via GitHub search). Unfortunately, I wasn't able to figure out where inline styles of wpTextbox0 and wpTextbox1 come from.

Workaround is to add a similar rule to your common.css, but with : example of using this workaround. —⁠andrybak (talk) 11:33, 20 July 2024 (UTC)