- From: Garrett Smith <dhtmlkitchen@gmail.com>
- Date: Mon, 10 Mar 2008 11:11:24 -0700
- To: "Anne van Kesteren" <annevk@opera.com>
- Cc: Www-style <www-style@w3.org>
On Mon, Mar 10, 2008 at 3:22 AM, Anne van Kesteren <annevk@opera.com> wrote: > Garrett Smith wrote: > > Anne van Kesteren wrote: > > >> Garrett Smith wrote: > >>> Element.getComputedValueAs(property, desiredUnit), would avoid this > >>> painful and limited approach. It would open other possibilities. > >> > >> How does that work for properties that don't take units, but keywords? > >> Or properties that take <color> values? > > > > null. or empty string. null could mean "not supported". If the method > > returns empty string, it might be a likely bug. I say this because > > some browsers still return empty string for some valid css 1 > > propertyValues on a computed style. > > > > For color, well, I guess you could allow for ("rgb" or "#") - that > > might be useful. > > Given the variety of values CSS properties take (and still expanding) I'm > not sure if your proposed method really scales. Having interfaces for > properties would probably work better. Then again, this would be something > for v2. > > > > >> That sounds reasonable. I've added a note about cascadedStyle. > > > > That's not showing up here: http://dev.w3.org/csswg/cssom/ > > Sorry, meant comment. And also, it's not checked in yet. > You appear to have agreed with something I wrote. What that is is a mystery. Is it possible to include your response? We list subscribers don't have access to your personal notes. > As I said, depends on the context. CSS pixels are defined by CSS: > > http://www.w3.org/TR/CSS21/syndata.html#length-units > I'm going to come right out and ask then: Should a CSS pixel include a decimal point? > > > > My point about clientTop (the one you snipped) described that > > clientTop is a rounded number, where as currentStyle is a string value > > that includes units. This string value is not rounded, well in Opera > > it is often floored, but that is a bug. > > I don't get the point. Yes, clientTop is an integer, and yes, the computed > style serialized as string can include more precision. Is that your point? Yes, that was my point. But when you say "clientTop is an integer" - do you mean that it SHOULD be an integer, or that that's what browsers currently do? I discussed that in my previous message. I'm not sure if you remember. You snipped it all of that out. It started with you saying that you didn't think clientTop was needed because we already have currentStyle and getComputedStyle. Then, I replied back to you that there's a difference between currentStyle, computedStyle, and clientTop, and went on to explain the difference. I am not sure if you read that or not. Garrett > > -- > Anne van Kesteren > <http://annevankesteren.nl/> > <http://www.opera.com/> >
Received on Monday, 10 March 2008 18:11:36 UTC