4 ms·
<button class="pure-button pure-button-disabled">A Disabled Button</button> Oh please. Why not just a <button disabled>? So much redundancy and overly-verbosen
by Yaggo 13y ago
<button class="pure-button pure-button-disabled">A Disabled Button</button>
Oh please. Why not just a <button disabled>? So much redundancy and overly-verboseness for nothing.
"Namespacing" your CSS classes would make sense if you were actually composing element's style from multiple frameworks/libraries (vs. programming code), but that's not usually the case with CSS frameworks.
- sergiotapia 13y agoI disagree with you. Have a .button class for styles of the button, font-family, height, width, border-radius, etc. You want _all_ .button elements to share this look and feel. Then overwrite background colors, border colors etc on a button-primary, button-delete, etc classes. It makes sense and it works.
- Yaggo 13y agoMy point is that <button> already means a button and can be selected for default styling with 'button' or 'button.delete' selectors (by the framework and by you for overwriting). Ditto for [disabled], etc. (... also, support for multi-class selectors .like.this.and.that landed ages ago, no need for repeating-your repeating-your-class repeating-your-class-names-manually.)
- sergiotapia 13y agoYour argument doesn't work in the majority of cases. Many times a button element can be either a small '.toolbar-button', or a '.widget-button' or a '.principal-button'. Difference sizes, looks and feel, for the same element type.
- Yaggo 13y agoPlease read again what I wrote above. I'm not saying every button should look identical or you shouldn't use classes at all.
- JoshMilo 13y agoIt's based on SMACSS, that's why they did it like that. It is a bit verbose though. I forked it so that I could make it a little cleaner. http://smacss.com/ http://smacss.com/
- beefxq 13y agoIt's people like you that produce impossible to maintain css...