Added logic for updating CSS by selector.