[jquery-dev] Re: Exception Thrown When Getting CSS Value

2009-05-08 Thread Stephen McKamey
That's even better. Sorry I hadn't read closely enough. That would satisfy all the requirements, and various expectations for it to act like an object/array/string. It would fail in an instanceof Array test but that is a small price to pay. On May 7, 10:15 am, Daniel Friesen

[jquery-dev] Re: Exception Thrown When Getting CSS Value

2009-05-07 Thread Stephen McKamey
Yes, I agree that the use-case is in question. We ran into this when a using the autogrow plugin: http://plugins.jquery.com/project/autogrow This plugin should be modified to check the appropriate sides and handle correctly. On the other hand, I don't think that crashing is an appropriate

[jquery-dev] Re: Exception Thrown When Getting CSS Value

2009-05-07 Thread Daniel Friesen
The problem there is I don't think it's a good idea to throw out output which makes this kind of thing illegal: e.style.margin = $(node).css('margin'); Which is why I made note of a technique like so: var top = ..., right = ..., ...; return { top: top, right: right, bottom: bottom, left:

[jquery-dev] Re: Exception Thrown When Getting CSS Value

2009-05-06 Thread Brandon Aaron
Out of curiosity... what are you expecting back from the call to padding when it is different for top/bottom vs left/right? If it returns a string then you'll have to do your own parsing. If it returns an object, then you'll have to access each property separately. Also should the return value be

[jquery-dev] Re: Exception Thrown When Getting CSS Value

2009-05-06 Thread Daniel Friesen
See bug 4295: http://dev.jquery.com/ticket/4295 Combined css properties like padding and margin are actually inconsistent across browsers when they come from the stylesheet. I sympathize though, I do a huge amount of css cloning myself and this kind of thing gets in the way. ~Daniel Friesen

[jquery-dev] Re: Exception Thrown When Getting CSS Value

2009-05-06 Thread Matt Kruse
On May 6, 8:28 pm, Brandon Aaron brandon.aa...@gmail.com wrote: Out of curiosity... what are you expecting back from the call to padding when it is different for top/bottom vs left/right? I think an equally valid question is... what does jQuery intend to do in such situations? Clearly,

[jquery-dev] Re: Exception Thrown When Getting CSS Value

2009-05-06 Thread Brandon Aaron
I believe that is exactly what we are trying to do. There is an ongoing discussion about how to handle retrieval of CSS shorthand properties in the ticket 4295 ( http://dev.jquery.com/ticket/4295 ). I think most of the confusion, at least for me, has been around the use-case for getting the

[jquery-dev] Re: Exception Thrown When Getting CSS Value

2009-05-06 Thread Karl Swedberg
On May 6, 2009, at 11:08 PM, Brandon Aaron wrote: Reasonable use-case but what about when the developer wants to copy the background property Or, even more problematic, the border property: border, border- color, border-width, border-style, border-top-color, border-top-width, and so on,