Page MenuHomePhabricator

Local issues with tab-size on ruwp
Closed, InvalidPublic

Description

I found that Wikipedia set the tab-size

pre, textarea {
    tab-size: 4;
}

But

  1. the tab-size property is only in the cssdraft and is not standard https://www.w3.org/TR/css-text-3/#tab-size
  2. by https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size it needs the prefix -moz- -o-
  3. the property is not supported by Edge and IE
  4. standard length 8, and was made non-standard 4

Because of this in Edge/IE and Chrome, the text with tab has a different size

For example: we like to embed templates and to beautifully (readability) format their code

{{template
| parameter =
| foo       =

Here instead of spaces we could use tabs, but in the edit window and in the pre block on the page, tabs have different lengths in Edge/IE and Crome.
Similarly, for other cases.

Event Timeline

Sunpriat2 created this task.Apr 3 2018, 2:49 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 3 2018, 2:49 PM

(Removing the Editing-team tag from this task - it is up to teams which tasks they have on their project workboards.)

  1. the tab-size property is only in the cssdraft and is not standard https://www.w3.org/TR/css-text-3/#tab-size

What is the problem about that?

  1. by https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size it needs the prefix -moz- -o-

No, that page says that the -moz- prefix is only required for Firefox version 52 or lower.

  1. the property is not supported by Edge and IE

What is a potential solution? To not use tab-size at all only because Microsoft browsers do not support that yet?

Also, steps to reproduce (some direct link where to see this problem / CSS applied) would be welcome.

Sunpriat2 added a comment.EditedApr 4 2018, 6:27 PM

https://ru.wikipedia.org/w/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:%D0%97%D0%B2%D0%B5%D0%B7%D0%B4%D0%B0/doc&oldid=91671399
Chrome:


IE:


source tag has:

.mw-highlight pre {
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
}

Presumably it was entered as 4 for the source code, for the beginning of the line. Perhaps it should be applied more selectively - for the code there are tags "source/syntaxhighlight" and "code".

This override is specific to Russian Wikipedia only: https://ru.wikipedia.org/wiki/MediaWiki:Common.css

/* Размер таба для обычного редактора и для тега <code> */
pre,
textarea {
	tab-size: 4;
}

I think you should discuss changing/removing it on the talk page there.

MediaWiki only sets tab-size: 4; in the SyntaxHighlight extension (T115284) but not for normal preformatted text. I think CodeEditor also uses tab size of 4, but it's not using CSS to override it.

Aklapper renamed this task from tab-size to Local issues with tab-size on ruwp.Apr 5 2018, 10:13 AM

I think you should discuss changing/removing it on the talk page there.

@Sunpriat2: Has such a discussion been started?

I don't see anything to do in this task currently, so shall this task get closed?

stjn closed this task as Invalid.Apr 19 2018, 11:15 PM
stjn claimed this task.
stjn added a subscriber: stjn.

As this is local CSS from Russian Wikipedia and not a global CSS rule, this should be decided in Russian Wikipedia.

You can refer to this link to have it discussed and resolved by a community consensus:
https://ru.wikipedia.org/wiki/MediaWiki_talk:Common.css