Move workspace CSS generation to a member function