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 26588 - transform-origin: value definition and description are inconsistent
Summary: transform-origin: value definition and description are inconsistent
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: Transforms (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Fraser
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-15 15:25 UTC by Alexander Zolotov
Modified: 2015-08-20 04:23 UTC (History)
6 users (show)

See Also:


Attachments

Description Alexander Zolotov 2014-08-15 15:25:39 UTC
There is third part of value definition:
 [ center | [ left | right ] ] && [ center | [ top | bottom ] ] <length>?

According to Css Values and Unit Module (http://dev.w3.org/csswg/css-values/#component-combinators) it should be interpreted as

 [ center | [ left | right ] ] && [ [ center | [ top | bottom ] ] <length>? ]

Because 'Juxtaposition is stronger than the double ampersand'. It means that value 'left top 20cm' is valid. Since '&&' is re-orderable combinator the 'top 20cm left' value is valid too.

But the description tells us that 'a third value always represents the Z position (or offset) and must be of type <length>' so 'top 20cm left' can't be valid.

Please fix the description or add extra brackets in value definition like in following example:

 [ [ center | [ left | right ] ] && [ [ center | [ top | bottom ] ] ] <length>? 

Also it seems that brackets in '[left | right]' and '[top | bottom]' groups are redundant.
Comment 1 Simon Fraser 2015-08-20 04:23:50 UTC
I changed it to:

  [ left | center | right | top | bottom | <percentage> | <length> ]
| 
  [ left | center | right | <percentage> | <length> ]
  [ top | center | bottom | <percentage> | <length> ] <length>?
|
  [[ center | left | right ] && [ center | top | bottom ]] <length>?

which I think is correct. I suspect it was copied from https://drafts.csswg.org/css-backgrounds-3/#position but without understanding the "edge plus delta" form that the final production is trying to address.