Use a css transition. Still causes a recursion chain though :(