Answer the question
In order to leave comments, you need to log in
How to write such a mixin in SASS?
The text-shadow property in CSS can have a lot of values. They are listed separated by commas. Here is an example:
text-shadow: -0.5px -0.5px 0 #fff,
0.5px -0.5px 0 #fff,
-0.5px 0.5px 0 #fff,
0.5px 0.5px 0 #fff,
0 0 17.9px rgba(255, 255, 255, 0.16);
@mixin text-stroke($weight, $color) {
text-shadow: $weight -$weight 0 $color,
$weight -$weight 0 $color,
-$weight $weight 0 $color,
$weight $weight 0 $color,
@content;
}
Invalid CSS after "...eight 0 $color,": expected ";", was "@content;"
Answer the question
In order to leave comments, you need to log in
expected ";"
@content
@mixin text-stroke($weight, $color) {
text-shadow: $weight -$weight 0 $color,
$weight -$weight 0 $color,
-$weight $weight 0 $color,
$weight $weight 0 $color;
@content;
}
@mixin text-stroke($weight, $color, $rest...) {
text-shadow: $weight -$weight 0 $color,
$weight -$weight 0 $color,
-$weight $weight 0 $color,
$weight $weight 0 $color,
$rest;
}
body {
@include text-stroke(10, #fff, ffffffffffff 1 1 1, ffffffffff 2 2 2);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question