This file can be imported using:
@import "compass/typography/links/link-colors"
=link-colors($normal, $hover: false, $active: false, $visited: false, $focus: false) color: $normal @if $visited &:visited color: $visited @if $focus &:focus color: $focus @if $hover &:hover color: $hover @if $active &:active color: $active
@mixin link-colors($normal, $hover: false, $active: false, $visited: false, $focus: false) { color: $normal; @if $visited { &:visited { color: $visited; } } @if $focus { &:focus { color: $focus; } } @if $hover { &:hover { color: $hover; } } @if $active { &:active { color: $active; } } }
Set all the colors for a link with one mixin call. Order of arguments is:
Those states not specified will inherit. Mixin to an anchor link like so:
a
+link-colors(#00c, #0cc, #c0c, #ccc, #cc0)