I have come across many sources advising me to reset HTML by manually resetting numerous individual properties, as demonstrated here: https://css-tricks.com/overriding-default-button-styles/
Another approach I discovered in CSS is simply using:
button: {all: unset;}
Could this be considered an anti-pattern? I am aware that a polyfill may be required, but it seems like most projects are already utilizing them.
EDIT: Feedback from comments indicated that my intention was too vague. My goal is to create a clear and structured markup. Initially, I had a <span>
tag containing an icon that functioned as a button. It was rightly pointed out that this should be wrapped within <button>
tags since it functions as a button. However, the default styles applied by the button tag, such as background and border, made the icon appear strange. This led me to question whether I should remove specific CSS properties or reset all of them.