CSS transition support for class changes and init for var changes