How to write this operator in scss?
How to write this operator in scss?
I'm trying to add the string the color is green inside the html based on the input I give in scss.
the color is green
@mixin jeansColor($jeancolor)
if(type-of($jeancolor)==string)
content: "the color is green"
.jeans:after
@include jeansColor("green");
<p class="jeans"> Jeans </p>
1 Answer
1
It's always the little details...just forgot to instantiate the if with @ : CodePen :)
@
@mixin jeansColor($jeancolor)
@if(type-of($jeancolor)==string)
content: "the color is green"
.jeans:after
@include jeansColor("green");
<p class="jeans"> Jeans </p>
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.