
SCSS Mixin für Hover-Stile
Mit diesem Mixin können hover-states geräteabhängig definiert werden.
Mehr Informationen zur Verbreitung gibt es hier.
/* Mixin */
@mixin hover {
@media screen and (hover: hover), screen and (min--moz-device-pixel-ratio: 0 ) {
&:hover { @content; }
}
}
/* Anwendung */
a {
color: #f00;
@include hover {
color: #0f0;
text-decoration: underline;
}
}