You could try #.
I had a similar problem with a mixin and lists
@mixin p($value, $position: a, $unit: $rhythm-unit){
$vallist: ();
@if length($value) > 1 {
@each $sval in $value {
$sval: 0 !default;
$vallist: append($vallist, #{$sval}#{$unit});
}
padding: $vallist;
} @else{
@if $position == t {
padding-top: $value+$unit;
} @else if $position == r {
padding-right: $value+$unit;
} @else if $position == b {
padding-bottom: $value+$unit;
} @else if $position == l {
padding-left: $value+$unit;
} @else {
padding: $value+$unit;
}
}
}
The problem was
append($vallist, $sval+$unit);
It always added quotes around these values e.g. "1rem" "1.25rem" which is not a correct css syntax.
I replaced it with:
append($vallist, #{$sval}#{$unit});
As you can see i use #-sign with {} and + it not necessary any more.
The very interesting here is that this only appear with lists/append as you can see in my outer else.
You could find it at the sass reference page Division and slash
If you want to use variables along with a plain CSS /, you can use #{} to insert them. For example:
p {
$font-size: 12px;
$line-height: 30px;
font: #{$font-size}/#{$line-height};
}
Hope it helps