|
|
|
|
|
by lumpypua
4360 days ago
|
|
I believe you're committing the greatest CSS Sin: Emulating the DOM structure using nesting. Here is one example: "#site-header.newheader nav>ul>li>a.buttonGreen" ... If you'd like more advice on how to fix this I have written many talks. I didn't know this was an issue until recently and now I'm slowly fixing it on my main project. I'd love your additional advice/pointers! |
|
The "getting started button" and "buy button" are both interaction buttons. (Similar buttons, but one is green and the other is yellow).
In Sass you represent that this way: 1. Placeholder %interaction-button class where you outline the fact that it has a border radius, color, and any other shared styling. 2. A button maker mixin where you put the colors that need to be changed, and any other flags (like has_sub_text: true for the unbold text) and then @extend's the placeholder above. 3. The classes ".buy-button {}" which include the mixin you made.