Categories
Passing a property as a mixin parameter?
How to make it work?
@mixin calc-size($size, $property) { $property: $size+px; }
p { @include calc-size(16, font-size); } div { @include calc-size(200, width); }
Answer the question
In order to leave comments, you need to log in
sass-lang.com/documentation/file.SASS_REFERENCE.ht... Replace $property with #{$property}
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question