SASS Variable within string [duplicate]

Yes, you just have to use variable interpolation. Example:

@mixin post-link ($class, $color, $hover) {
    a.#{$class}:link {
        color: $color;
    }
    a.#{$class}:hover {
        color: $hover;
    }
}

Example on SassMeister: http://sassmeister.com/gist/9533103

The key is adding #{ and } around your variable names to get them expanded.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)