W3C home > Mailing lists > Public > www-style@w3.org > April 2010

Re: [cssom] CSS Value API

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 07 Apr 2010 11:14:35 +0200
To: "Chris Marrin" <cmarrin@apple.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.vasbylx964w2qv@annevk-t60>
On Wed, 07 Apr 2010 01:30:16 +0200, Chris Marrin <cmarrin@apple.com> wrote:
> How do you see transforms and CSSMatrix fitting into this? Currently you  
> define a transform property like this:
>
> 	transform:translate(20px, 50%) rotate(45deg) scale(0.5) translateZ(5px);
>
> In WebKit, a transform is a CSSValueList. Each element of the list is  
> one transform function (4 in the above example) and is of type  
> CSSTransformValue. This inherits from CSSValueList and adds a enum which  
> is the type of the function (e.g., TRANSLATE or ROTATE). Each element of  
> the CSSTransformValue represents a param of the transform function and  
> is always a primitive value. So here we're using a list not to represent  
> separate items for a property as in background, but to represent  
> separate components of a single item.
>
> Does this fit in your model?

Yeah. my idea was to introduce a generic function type that inherits (or  
more likely also implements) from the conceptual CSSList and exposes the  
type of function and its arguments. This could then be used for  
transformations, but also, shape() and attr().

And if for some functions we want to introduce a dedicated interface, e.g.  
for matrix(), but certainly also url(), we can do that too.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Wednesday, 7 April 2010 09:15:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:26 GMT