optimize class css of messages