M
M
Maksim Ivanov2018-10-30 13:37:51
Layout
Maksim Ivanov, 2018-10-30 13:37:51

How to translate from less to sass?

I have this code in less:

.fonts(@size, @lineheight, @bold:normal){
  font-size: @size;
  line-height: @lineheight;
  font-weight: @bold;
}
.fonts(11px, 50px, bold);

Can you tell me how to convert it to sass??
so that the same thing could be used in sass.
This is sass, do not confuse it with scss

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2018-10-30
@pilolin

@mixin fonts($size, $lineheight, $bold:normal){
  font-size: $size;
  line-height: $lineheight;
  font-weight: $bold;
}

.fonts { 
  @include fonts(11px, 50px, bold);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question