[jQuery] Get size for elements that don't exist yet

[jQuery] Get size for elements that don't exist yet


I have found that in some applications I need to know the size or
other CSS attributes of elements that haven't been inserted int othe
DOM yet. So far I've been doing this by inserting an example of the
element I need the size of into the DOM, selecting it, getting it's
css() and then removing it again.
I really don't like this approach in the least though, because while
it works it's inelegant, computationally expensive and in some
browsers it can cause flickering. The more elements you need to get
parameters for, the more you need to add and to the DOM and the more
flickering occurs. You can mitigate the flickering problem by making
sure the elements you add to the dome have a css ('visibility',
'hidden') but that still leaves the other problems.
So basically, what I'm wondering is, if there is a CSS rule that
defines an element's parameters, and if no examples of said element
exist in the DOM yet, would it be possible to get the parameters
direct from the stylesheet?