fix keyframe mixin and add margin auto

Change-Id: I6cf3802e5c750c3f2ebb74030f17ed5bf6e2d7aa