I have been writing some LESS CSS code recently, and was wondering what the best way for format this would be.
Ideally i don't want to reproduce the button classes, and separate them from the input tags, unless that's the best way to go.
.button, button, input[type="submit"], input[type="reset"], input[type="button"] { display: inline-block; height: 38px; padding: 0 30px; color: #555; text-align: center; font-size: 11px; font-weight: 600; line-height: 38px; letter-spacing: .1rem; text-transform: uppercase; text-decoration: none; white-space: nowrap; background-color: transparent; border-radius: 4px; border: 1px solid #bbb; cursor: pointer; box-sizing: border-box; &:hover, &:focus { color: #333; border-color: #888; outline: 0; } &.button-primary { color: #FFF; background-color: #33C3F0; border-color: #33C3F0; &:hover, &:focus { color: #FFF; background-color: #1EAEDB; border-color: #1EAEDB; } } } I did initially think about doing them like this
.button, button, input { &:[type="submit"], &:[type="reset"], &:[type="button"] {} However doing them like this would mean the button class would also have a type.
Any help would be much appreciated, thanks.
extend?