This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15631 - transform-origin value description is confusing, or possibly incorrect
Summary: transform-origin value description is confusing, or possibly incorrect
Status: RESOLVED DUPLICATE of bug 15432
Alias: None
Product: CSS
Classification: Unclassified
Component: Transforms (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Dean Jackson
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 17:24 UTC by Aryeh Gregor
Modified: 2012-01-25 18:38 UTC (History)
4 users (show)

See Also:


Attachments

Description Aryeh Gregor 2012-01-19 17:24:28 UTC
(values pretty-printed for legibility)

"""
Value:
[
  [
    [ <percentage> | <length> | left | center | right ]
    [ <percentage> | <length> | top | center | bottom ]?
  ]
  <length>
] | [
  [
    [ left | center | right ]
    ||
    [ top | center | bottom ]
  ]
  <length>
]
"""
http://dev.w3.org/csswg/css3-3d-transforms/#transform-origin

The prose assumes that this works out to a three-dimensional point, but it's not explained how.  The use of "?" in the first part and "||" in the second part implies that a two-argument version is allowed, but the meaning isn't explained.  E.g., "50% 10px" is allowed by this grammar, but nothing says how to interpret it.  In reality, it will be interpreted the same as "50% 10px 0", but I don't think that's the intent.

I suggest that this be changed to

"""
Value:
[
  [ <percentage> | <length> | left | center | right ]
  [ <percentage> | <length> | top | center | bottom ]
  <length>
] | [
  [
    [ left | center | right ]
    &&
    [ top | center | bottom ]
  ]
  <length>
]
"""

so that exactly three arguments must be provided for the three-dimensional version.  Then if the 2D transform-origin is changed to only allow one or two arguments (bug 15432), there will be no ambiguity.

(Alternatively, specify the one-, two-, and three-argument versions of transform-origin in the 3D spec, and have it supersede the 2D spec.  Or merge the specs.  But at a minimum, they should be consistent.)
Comment 1 Simon Fraser 2012-01-25 18:38:02 UTC

*** This bug has been marked as a duplicate of bug 15432 ***