Re: [cssom][dom-level-2-style] Status of CSSValue and other DOM-L2-Style interfaces obsoleted on www-style

On Sat, 10 Oct 2009 00:38:31 +0200, Garrett Smith <dhtmlkitchen@gmail.com>  
wrote:
> On Thu, Oct 8, 2009 at 1:59 AM, Anne van Kesteren <annevk@opera.com>  
> wrote:
>>  ele.style.width.px += 2
>
> How does that work?
>
> Are [you] proposing a special string value?

That was the initial idea, yes. It's probably too hard and hacky to do it  
in practice.


>> or some such. (We might need to use a different object than style since
>> making something both an object and DOMString for backwards  
>> compatibility is asking for trouble I suppose.)
>
> The need to use a different object has not been provided for. I
> understand that it is an alternative to avoid (incongruous,
> disastrous) hacks necessary to fulfill the proposal for style.width.px
> += 2.
>
> The proposal does not state a need, does not address issue of units,
> percentage, auto, etc.

The returned object would have other members than just px.


> Did you get a chance to see the el.style.getValueAs() proposal?
>
> http://lists.w3.org/Archives/Public/www-style/2009Sep/0208.html

I'm not really a big fan of that given that the second argument depends on  
the first. It also does not allow for modification, just reading. E.g. if  
we want to provide a better runtimeStyle API this would not fit.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Monday, 12 October 2009 09:35:56 UTC