Drupal 8/9 remove classes for attributes in twig templates

In Drupal, classes, IDs & data attributes are applied to the HTML elements globally. Here is the logic to remove unwanted classes for the respective attributes.
copy-icon

Comments

Authors

Read Next