Bug Tracker

Opened 17 years ago

Closed 16 years ago

#86 closed enhancement (fixed)

Animations using percent or ems

Reported by: [email protected] Owned by:
Priority: minor Milestone: 1.2
Component: effects Version: 1.1.4
Keywords: animations units fx Cc:
Blocked by: Blocking:

Description (last modified by john)

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.

Change History (1)

comment:1 Changed 16 years ago by john

Description: modified (diff)
Milestone: 1.2
need: Review
Resolution: fixed
Status: newclosed
Version: 1.1.4

Fixed in SVN rev [3133].

Note: See TracTickets for help on using tickets.