Page MenuHomePhabricator

no padding between TOC numbers and TOC titles in RTL wikis
Closed, ResolvedPublic


no padding between TOC numbers and TOC titles in RTL wikis.
Browser: Firefox (but works correctly in Chrome)
This is due to:

Event Timeline

eranroz raised the priority of this task from to Needs Triage.
eranroz updated the task description. (Show Details)
eranroz added a subscriber: eranroz.
eranroz triaged this task as High priority.Nov 7 2015, 8:23 AM
eranroz updated the task description. (Show Details)
eranroz set Security to None.
  1. I had to revert it locally in hewiki for now:
  2. It seems that Firefox doesn't accept content:"" (e.g empty string) - a space (or other character) should work. However adding content may have other undesirable affects(?). Other option is to change the TOC generation to use ol instead of ul and let the browser handle it in its native way - but this change behaviour/design unless extra css/JS handle the whole li.

I guess the problem is that padding-right get not flipped to padding-left. The automatic flipping based on the direction of the user interface language and not on the direction of the page content language.

With several additional rules this can bind on .mw-content-ltr and .mw-content-rtl. With T89561 I request a improvement for this complicated rules.

In I used

.tocnumber:after {
	content: "";
	padding-right: 0.5em;

instead of

.tocnumber {
	padding-right: 0.5em;

so that IE7 and lower ignores the whole definition. The padding-right has also the flipping problem.

Maybe the flipping problem can avoided by using only CSS definitions which are not flippable.

Change 251700 had a related patch set uploaded (by Gerrit Patch Uploader):
TOC: Fix problems on RTL wikis

matmarex added a subscriber: matmarex.

Change 251700 merged by jenkins-bot:
TOC: Fix problems on RTL wikis

Is this fixed globally? @eranroz I see extra whitespace in the TOC in hewiki due to your edit that is absent in other wikis (if you hover a section title, the leading space would be underlined, see below).

On the other hand, if I switch off the styles you introduced in that edit, the TOC number padding is fine both in Chrome and in Firefox.

I came here because this style breaks correct RTL text display in the TOC in my script, Convenient-Discussions:

instead of