I am experimenting with using EMs to specify coordinates and transitioning font-size
to display content at different sizes for a block-based graphics project.
Check out this jsfiddle that highlights the issue. It works fine in Firefox, no transition in IE (which is okay), but in Safari and Chrome it has a strange jerky effect.
html:
<div class="parent">
<div class="child">
</div>
</div>
css:
.parent{
-webkit-transition: all;
-webkit-transition-duration: 10s;
background-color: rgba(0,255,0,0.3);
font-size:16px;
width:16em;
height:16em;
}
.child{
background-color: rgba(255,0,0,0.3);
width: 8em;
height:8em;
}
javascript:
$('.parent').css('font-size', '32px');
Is there a way to achieve a smooth transition without giving up on using em-based coordinates?