Suggested user-notice message: mw-content-ltr, mw-content-rtl and mw-content-{{dir}} are no longer needed as they were deprecated since 2022 as T287701, the primarily remaining use was bullets correct placement which now works without the classes (fixed here). If they are used anywhere without the dir attribute, add the attribute and remove the class as that's already broken with the mobile interface / vector-2022.
Feature summary:
For years we had to carefully use mw-content-ltr and mw-content-rtl subsections to make unordered and ordered list margin values work in LTR and RTL directions as expected. Now with the widespread existence of CSS Logical https://drafts.csswg.org/css-logical/#margin-properties such workarounds aren't needed as now we can define styles in a direction aware way so no longer nested .mw-content-rtl .mw-content-ltr {ul,li} is needed.
Use case(s):
For example render this in an English wiki,
<div dir="rtl"> * a * b * c # 1 # 2 # 3 </div> <div dir="rtl" class="mw-content-rtl"> * a * b * c # 1 # 2 # 3 </div>
You'll get
That's why https://github.com/wikimedia/mediawiki/blob/0791048/resources/src/mediawiki.skinning/i18n-all-lists-margins.less existed so one uses mw-content-rtl that bullets will be put at the right place, but now that direction agnostic CSS definitions exists through CSS Logical we can just go without that mw-content-{ltr,rtl} and have,
When this purposed change is applied.
The only problem is existence of older browsers that don't yet support CSS Logical so this change actually keeps compatibility margin values so older browser can benefit from and ignore newer CSS Logical margin-inline-{start,end} counterparts and only remaining issue will be support of nested directions for that older browser which I believe given the benifits for newer browser, the fact margin values will be correct even is unpresence mw-content-{ltr,rtl}, is negligible.
The purposed change uses https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline-start over https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inline which is supported on even older browsers.
Benefits:
So in case there are three or more level of nested direction, this can still work and users no longer have to define mw-content-rtl for their content.
This change is partially motivated by the fact I had to use mw-content-{ltr,rtl} in Commons like this https://commons.wikimedia.org/w/index.php?title=Template:PD-Layout&diff=prev&oldid=101923327 so bullets in copyright tags be displayed in the correct place and this change makes us free from such thing.
I think the first step can be applying https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1052443 and then i18n-all-lists-margins.less then we can even remove i18n-all-lists-margins altogether given it was just a workaround as the lack of direction agnostic CSS.







