- From: Garrett Smith <dhtmlkitchen@gmail.com>
- Date: Mon, 12 Oct 2009 17:23:45 -0700
- To: Anne van Kesteren <annevk@opera.com>
- Cc: Sylvain Galineau <sylvaing@microsoft.com>, "www-style@w3.org" <www-style@w3.org>, "bert@w3.org" <bert@w3.org>, Sam Fortiner <samfort@microsoft.com>, Travis Leithead <travil@microsoft.com>
On Mon, Oct 12, 2009 at 2:35 AM, Anne van Kesteren <annevk@opera.com> wrote: > 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. > Like rgba, or "%" ? > >> 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. Right. Reading style.getValueAs("width", "RGB") would result either in error or empty string. The other way to do that would be to make it a two-step process. var wo = style.getCSSObject("width"); var wPx = wo.px; var pixelWidth = parseInt(wPx, 10); It also does not allow for modification, just reading. E.g. if we > want to provide a better runtimeStyle API this would not fit. > I have no idea what are you thinking of for runtimeStyle that creates a conflict, and so I can't see why the proposal would conflict with your idea for runtime style (because you haven't said what the idea is nor have you stated why it conflicts with this proposal). It sounds like you are saying that you have a larger view of the big picture but won't say what it is, but will say that the proposal won't work with that idea. What is the problem exactly? Garrett
Received on Tuesday, 13 October 2009 00:24:20 UTC