We essentially have three different types of buttons:
On most projects, I see developers choose to identify all of these as the same component: the
As a result of trying to shoehorn everything under the umbrella of a single component, we run into a lot of style overrides. The default style is the actual button. And then text buttons need to strip away all those styles. And image buttons have other constraints like handling hover and active states of the images.
Just because the HTML under the hood is the same, doesn’t mean we need to use the same class for everything. Since we have three different types of buttons, we should identify them as such.
Or whatever name you want to come up with. (Naming things is hard.)
With each clearly defined, there is no need to override styles to add or takeaway styles applied by other button styles. This simplicity results in less complexity and possibly even less code by not having to override existing styles.久久中文字幕免费高清,三级在线看中文字幕完整版,中文字幕偷乱视频在线