style first, then DOM building