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 15710 - Serialization of inline style should be specified for function lists (e.g., transform)
Summary: Serialization of inline style should be specified for function lists (e.g., t...
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-25 18:12 UTC by Aryeh Gregor
Modified: 2013-08-23 19:05 UTC (History)
6 users (show)

See Also:


Attachments

Description Aryeh Gregor 2012-01-25 18:12:15 UTC
data:text/html,<!DOCTYPE html>
<script>
document.head.style.transform = 'RotatE( 45dEg )scalex(2)';
document.documentElement.textContent = 
document.head.style.transform
</script>

This outputs "rotate(45deg) scaleX(2)" in IE9, Chrome 17 dev, and Opera Next 12.00 alpha.  In Firefox 12.0a1, it outputs "Rotate(45deg) scalex(2)", not normalizing the capitalization of the transform functions.  It should be specified that Firefox's behavior is incorrect.
Comment 1 Aryeh Gregor 2012-01-25 19:23:57 UTC
More thorough test-case:

data:text/html,<!DOCTYPE html>
<script>
document.head.style.transform = 'RotatE( 3rAd )scalex(2) translateX(10%)';
document.documentElement.textContent = 
document.head.style.transform
</script>

IE9, Chrome 17 dev: rotate(3rad) scaleX(2) translateX(10%)
Firefox 12.0a1: RotatE(3rad) scalex(2) translateX(10%)
Opera Next 12.00 alpha: rotate(171.89deg) scaleX(2) translateX(10%)

I suggest the IE/Chrome behavior as standard.  Units should be preserved, unlike Opera; and case should be normalized, unlike Gecko.

Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=721136
Comment 2 Aryeh Gregor 2012-02-13 17:31:29 UTC
This should probably be in CSSOM, actually, not the transforms spec.
Comment 3 Dirk Schulze 2012-02-26 15:31:05 UTC
(In reply to comment #2)
> This should probably be in CSSOM, actually, not the transforms spec.

Can we move it to product CSSOM?
Comment 4 Aryeh Gregor 2012-03-01 17:06:52 UTC
Now that CSSOM is being actively edited, I'm happy to move it there:

http://dvcs.w3.org/hg/cssom/raw-file/tip/Overview.html/#serializing-css-values

That should say how to serialize a function.  The serialization should be something like: first the function's name, in whatever case is used in the specification (usually but not always lowercase); then "("; then the arguments, serialized according to their type, separated by ", "; then ")".

Glenn, does that sound good to you?
Comment 5 Glenn Adams 2012-03-01 17:30:37 UTC
(In reply to comment #4)
> Now that CSSOM is being actively edited, I'm happy to move it there:
> 
> http://dvcs.w3.org/hg/cssom/raw-file/tip/Overview.html/#serializing-css-values
> 
> That should say how to serialize a function.  The serialization should be
> something like: first the function's name, in whatever case is used in the
> specification (usually but not always lowercase); then "("; then the arguments,
> serialized according to their type, separated by ", "; then ")".
> 
> Glenn, does that sound good to you?

sounds good; have this on my edit list already!
Comment 6 Simon Pieters 2013-08-23 19:05:14 UTC
Currently CSSOM switches based on component value type, so the following (at least) are missing

<transform-list>
<transform-function>
<translation-value>

(I'm not sure we can use more abstract types like css-syntax's component value, since we need special rules for e.g. <color>.)