MediaWiki talk:Gadget-site.css

From mediawiki.org
(Redirected from MediaWiki talk:Common.css)
Latest comment: 3 years ago by Tacsipacsi in topic Code direction

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