Skip to main content

Bug Tracker

Side navigation

#86 closed enhancement (fixed)

Opened July 22, 2006 05:33AM UTC

Closed September 08, 2007 02:56AM UTC

Animations using percent or ems

Reported by: bradleysepos@gmail.c Owned by:
Priority: minor Milestone: 1.2
Component: effects Version: 1.1.4
Keywords: animations units fx Cc:
Blocked by: Blocking:
Description

At some point it should be possible to retain the relative units when processing effects.

For instance, say I have an element that is set to 8em height via CSS. Let's assume for this example that 1em = 10px in the current document.

If we do a jQuery hide/show on this element, jQuery will measure the current height of the element in px, then perform the transitions also in px. The element will have a final size of 80px instead of 8em, and all transitions are performed using px and not a relative unit.

In short, jQuery should either perform the transitions using px and then return the element to the relative unit (em or %), or it should use the relative unit currently in use to actually perform the transitions.

Ideally, this would be optional for the programmer via a "use relative" parameter for FX. Likely, the script would have to parse the CSS to determine the original units used, then compare it against the current DOM properties to confirm that the element is still using a relative unit and has not been manually converted to px by another script. So there will be some checks involved to do it right, but in the end this would definitely be an amazing feature for liquid/elastic layouts.

Attachments (0)
Change History (1)

Changed September 08, 2007 02:56AM UTC by john comment:1

description: At some point it should be possible to retain the relative units when processing effects.\ \ For instance, say I have an element that is set to 8em height via CSS. Let's assume for this example that 1em = 10px in the current document.\ \ If we do a jQuery hide/show on this element, jQuery will measure the current height of the element in px, then perform the transitions also in px. The element will have a final size of 80px instead of 8em, and all transitions are performed using px and not a relative unit.\ \ In short, jQuery should either perform the transitions using px and then return the element to the relative unit (em or %), or it should use the relative unit currently in use to actually perform the transitions.\ \ Ideally, this would be optional for the programmer via a "use relative" parameter for FX. Likely, the script would have to parse the CSS to determine the original units used, then compare it against the current DOM properties to confirm that the element is still using a relative unit and has not been manually converted to px by another script. So there will be some checks involved to do it right, but in the end this would definitely be an amazing feature for liquid/elastic layouts.At some point it should be possible to retain the relative units when processing effects. \ \ For instance, say I have an element that is set to 8em height via CSS. Let's assume for this example that 1em = 10px in the current document. \ \ If we do a jQuery hide/show on this element, jQuery will measure the current height of the element in px, then perform the transitions also in px. The element will have a final size of 80px instead of 8em, and all transitions are performed using px and not a relative unit. \ \ In short, jQuery should either perform the transitions using px and then return the element to the relative unit (em or %), or it should use the relative unit currently in use to actually perform the transitions. \ \ Ideally, this would be optional for the programmer via a "use relative" parameter for FX. Likely, the script would have to parse the CSS to determine the original units used, then compare it against the current DOM properties to confirm that the element is still using a relative unit and has not been manually converted to px by another script. So there will be some checks involved to do it right, but in the end this would definitely be an amazing feature for liquid/elastic layouts.
milestone: → 1.2
need: → Review
resolution: → fixed
status: newclosed
version: → 1.1.4

Fixed in SVN rev [3133].