Open mhulse opened 6 years ago
SCSS template for default
, hover
, focus
, pressed
and disabled
states:
.button {
// Default:
&,
&:visited {
}
// Hover:
&:visited:hover,
&:hover {
}
// Focus:
&:focus,
&:focus:hover {
}
// Pressed:
&:active,
&:active:hover {
}
// Disabled:
&:disabled,
&.button-is-disabled {
}
}
Recommended order is:
Star wars fans can remember it as: Lord Vader’s Handle Formerly Annakin
With the above example in mind, I generally write my link styles like so:
Note:
a
anda:link
are synonymous and:link
can be omitted (though, their specificity is different:1
and2
respectively).