Jump to content

MediaWiki talk:Common.css

Add topic
From mediawiki.org

Code direction

[edit]

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)Reply

The above code won’t work. ResourceLoader “helps” by flipping directions in right-to-left languages, so the above code will be transformed into direction: rtl if the user interface language is RTL. This function can be disabled, luckily:
pre, code {
	/* @noflip */
	direction: ltr;
}
Tacsipacsi (talk) 11:27, 13 September 2020 (UTC)Reply

Dark mode fix

[edit]

{{Edit protected }} Please add this string underneath line 52:

color:#222; /* dark mode fix */

That should fix a few things such as the "semi-protected page" banners (example). Thanks! –Quiddity (talk) 03:09, 9 July 2024 (UTC)Reply

Done. * Pppery * it has begun 03:55, 9 July 2024 (UTC)Reply

Why was MediaWiki:Common.css moved to MediaWiki:Gadget-site.css

[edit]

Why was MediaWiki:Common.css moved to MediaWiki:Gadget-site.css?

On the local MediaWiki software, only the MediaWiki:Common.css page exists, and it works. Network-charles (talk) 18:18, 7 September 2024 (UTC)Reply

The technical story here is that this page is loaded via Extension:Gadgets rather than as the built-in CSS loaded. Why Krinkle chose to set that up on this wiki in 2012 when no other wiki does it, though, is mysterious to me. * Pppery * it has begun 18:21, 7 September 2024 (UTC)Reply
Ok. I added a new instruction to the Manual:Image Administration page, it describes how to hide sections of an image page. This instruction referenced the MediaWiki:Common.css page, which is available by default on most local MediaWiki installations. Network-charles (talk) 18:31, 7 September 2024 (UTC)Reply
@Pppery, Common.css does not load on mobile domain, while this gadget does. (It is also render-blocking, unlike Mobile.css, in a time before Minerva.css was loaded on mobile domain.)
In which regard, I have it mind to flip the relevant config option so that Common.css and Print.css can be used again here for all domains and then this page can be "moved" back. Izno (talk) 16:01, 12 September 2024 (UTC)Reply
I've filed phab:T375540 for this. Izno (talk) 17:26, 24 September 2024 (UTC)Reply
Well, that's done now. Now we can go on a moveathon. Izno (talk) 20:31, 24 September 2024 (UTC)Reply

I can't do the moves, so I'll leave someone else to do it:

  1. In MediaWiki:Gadgets-definition, remove site-styles[ResourceLoader|default|hidden]|site.css
  2. In same page, change the line
    site[ResourceLoader|default|peers=site-styles|dependencies=mediawiki.util,ext.gadget.site-styles]|site.js|site-tpl-copy.js|site-tpl-copy.css
    to
    syntaxhighlight-copy[ResourceLoader|default|dependencies=mediawiki.util]|site-tpl-copy.js|site-tpl-copy.css
  3. Add MediaWiki:Gadget-syntaxhighlight-copy with some content like "Add a copy button for syntax highlighted blocks in wiki content"
  4. Move MediaWiki:Gadget-site.css to MediaWiki:Common.css. In the move screen, include all subpages and talk pages, move without redirects, and when it protests, set the target page to be deleted.
  5. Move MediaWiki:Gadget-site.js to MediaWiki:Common.js in the same way.
  6. Clean up any talk pages that may still be lying around for some reason or another.

Izno (talk) 20:43, 24 September 2024 (UTC)Reply

Yes Done JJMC89 (talk) 00:56, 25 September 2024 (UTC)Reply
Great job everyone! Network-charles (talk) 06:08, 25 September 2024 (UTC)Reply
OSZAR »