Add a category's css class to its item. Closes #1557.