This project is archived and is in readonly mode.

Tween and Morph for Em values
Reported by Michal | December 27th, 2008 @ 12:41 PM | in 2.0 (closed)
While .setStyles works find to set lengths in "em"s, tween and morph don't seem to work. They seem to act as though all lengths are set as px.
A test case is at http://yetagain.net/sandbox/morp...
(I'm not sure if this is a bug or by design however)
Comments and changes to this ticket
-
Michal December 28th, 2008 @ 11:12 AM
I'm an idiot, I've just found the 'unit' option. (In fact, I even have a vague memory I have posted something like this before... oh dear).
Still, it would be nice to automatically determine what format the string is in...
-
Fábio M. Costa January 3rd, 2009 @ 03:24 PM
Automatically detecting the unit would be nice, but it would make the start function slower, and this is not a necessary thing, since you have the unit option, and pixel is used in 99% of the cases. Thats my opinion.
-
Valerio January 12th, 2009 @ 04:01 PM
- State changed from new to open
maybe it would be too much code just to autodetect units in strings. MooTools also "supports" named strings in effects (for example when using shorthands like "background": "1px solid #ff3300") so it makes it more difficult to parse the string and get the unit automatically.
However, probably something could be done. Investigating.
-
Breno Ribeiro May 16th, 2010 @ 12:31 AM
- Tag changed from bug, css, morph, tween to bug, css, morph, tween, units
Adding a testcase focused mainly on background-position.
Any news on this one?
Tested with 1.2.4 and still it has a unit as default for any css property. -
ibolmo January 19th, 2012 @ 08:27 AM
- State changed from open to resolved
- Tag changed from bug, css, morph, tween, units to css, bug, morph, tween, units
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »