Page MenuHomePhabricator

CSSJanus only supports flipping one text-shadow or border-shadow in RTL languages while the CSS syntax allows multiple
Closed, DeclinedPublic

Description

It flipped the y-offset for some reason:

ltr: text-shadow: #333333 0px -1px 1px, #FFFFFF 0px 2px 1px;
rtl: text-shadow: #333333 0px 1px 1px, #FFFFFF 0px 2px 1px;

That was weird. Now of course in that case it needn't flip at all and I can just tell it not to, but this still ain't proper behaviour.


Version: 1.23.0
Severity: enhancement

Details

Reference
bz60805

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:51 AM
bzimport set Reference to bz60805.
bzimport added a subscriber: Unknown Object (MLST).
Isarra created this task.Feb 4 2014, 2:28 AM

(In reply to comment #0)

It flipped the y-offset for some reason:
ltr: text-shadow: #333333 0px -1px 1px, #FFFFFF 0px 2px 1px;
rtl: text-shadow: #333333 0px 1px 1px, #FFFFFF 0px 2px 1px;

When you say "it flipped," what is "it"?

Is this a ResourceLoader bug?

Isarra added a comment.Feb 4 2014, 3:37 AM

See the numbers in the rule? The -1 became a 1. It flipped.

Is resourceloader what flips the interface for rtl languages?

(In reply to comment #2)

See the numbers in the rule? The -1 became a 1. It flipped.

Yes, the CSS changed (flipped), but what changed it? Where did you see this? What were you doing when this happened? Are there exact steps to reproduce?

Isarra added a comment.Feb 4 2014, 6:22 AM

I don't know; where does mw flip the interface css for rtl languages?

I was juggling ostriches on the moon at the time. I suppose to reproduce it you would have to go to the moon and juggle ostriches, then. Oh, and put something like what I pasted above in a file that gets flipped, probably. Unless it really was the ostriches what did it? Now there's a thought.

URL and screenshot welcome.

(In reply to comment #0)

ltr: text-shadow: #333333 0px -1px 1px, #FFFFFF 0px 2px 1px;
rtl: text-shadow: #333333 0px 1px 1px, #FFFFFF 0px 2px 1px;

There are two shadows defined here, and ResourceLoader (or actually CSSJanus) only supports flipping the first one in a rule right now. :(

I added the half-baked feature in I97ee7431 to fix bug 45677.

(Rephrasing the summary and moving to a better component.)

Ah, thanks. That explains it (and why this seemed so familiar, d'oh).

Krinkle closed this task as Resolved.Apr 28 2015, 5:33 PM
Krinkle claimed this task.

I can't reproduce this in the latest version of CSSJanus.

https://cssjanus.github.io/#input/.foo%20%7B%0A%20text-shadow%3A%20%23333333%200px%20-1px%201px%2C%20%23FFFFFF%200px%202px%201px%3B%0A%7D

Also verified with MediaWiki that this rule is not flipped.

matmarex reopened this task as Open.Jun 3 2015, 4:19 PM

That test case is flawed, because the value being flipped is the '0px', which when flipped is still '0px'. https://cssjanus.github.io/#input/.foo%20%7B%0A%20text-shadow%3A%20%23333333%2099px%20-1px%201px%2C%20%23FFFFFF%2099px%202px%201px%3B%0A%7D

Krinkle removed Krinkle as the assignee of this task.Aug 29 2015, 12:53 AM
Krinkle raised the priority of this task from Low to Normal.
Krinkle set Security to None.
Krinkle removed a subscriber: wikibugs-l-list.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 29 2015, 12:53 AM

@matmarex Can you make sure this is reported in the CSSJanus issue tracker, and link it from the task description?

Restricted Application added a project: Performance-Team. · View Herald TranscriptMar 27 2018, 7:49 PM
Krinkle moved this task from Limbo to Watching on the Performance-Team (Radar) board.
Imarlier closed this task as Declined.Jun 20 2018, 9:35 AM
Imarlier added a subscriber: Imarlier.

If this issue still exists, it should be reported to the CSSJanus issue tracker.

If this issue still exists, it should be reported to the CSSJanus issue tracker.

...and https://www.mediawiki.org/wiki/Upstream_projects says that is https://github.com/cssjanus/cssjanus/issues