Closed Bug 1522967 Opened 5 years ago Closed 5 years ago

Unitless -webkit-transform:perspective(500) is accepted in Chrome and Webkit, but not Firefox.

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1362499
Tracking Status
firefox66 --- affected

People

(Reporter: twisniewski, Unassigned)

References

Details

(Whiteboard: [webcompat])

Attachments

(1 file, 1 obsolete file)

Attached file test.html (obsolete) —

It turns out that unitless perspective (and perhaps other bits) of CSS transforms are accepted by Chrome and Safari for their webkit-prefixed variants (although they do properly reject them for the standard/unprefixed transform property).

But this acceptance of "unitless perspective" is causing problems with a least one live site, which hides its mobile hamburger menu using such a transform (see https://webcompat.com/issues/21898).

I've attached a reduced test-case showing the basic problem.

Flags: webcompat?
Attached file testcase 1

The original testcase didn't directly show the issue, since it had a workaround with unprefixed 'transform' & with pixel units.

Here's an adjusted version without that workaround, which does show the rendering difference.

EXPECTED RESULTS:
No text should be visible. (And the -webkit-transform expression should be accepted & honored.)

ACTUAL RESULTS:
Text is visible (And the -webkit-transform expression is rejected.)

Attachment #9039208 - Attachment is obsolete: true

This seems to be a quirk that is specific to -webkit-transform, BTW.

(i.e. Chrome accepts the unitless value in the "-webkit-transform" property alias, but rejects it in the unprefixed 'transform' property)

Priority: -- → P3

If this is something we want to support, probably we should get compatibility spec document it, otherwise we can probably ask whether Blink and WebKit can drop it.

Chrome Platform Status has an item for this: https://www.chromestatus.com/metrics/feature/timeline/popularity/1672

A popularity of 0.04% is close to their removal criteria IIRC. I wonder whether this number has already taken the existence of standard usage (i.e. the "workaround" mentioned in comment 1) into consideration. If not yet, it is probably likely to be safe to remove for them.

Mike, what do you think?

Flags: needinfo?(miket)

Edge had implemented this quirk. Let's continue conversation in https://github.com/whatwg/compat/issues/100 to see if Blink feel like they can remove it.

(also, this is a dupe of 1362499)

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(miket)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: