D
D
deniskins232018-08-11 16:28:53
Sass
deniskins23, 2018-08-11 16:28:53

Why are sass mixins throwing an error?

Good day. Tell me who knows. Wrote such a mixin in sass with .sass syntax

=font($alias, $name)
  font-family: $alias
  src: url(./assets/fonts/" + $name + ".woff") format(woff), url(./assets/fonts/" + $name + ".woff2") format(woff2)
  font-weight: normal
  font-style: normal

I call it like this
+font(Roboto, Roboto)
The project is built with the help of a gallp and the console gives the following error
Details:
    status: 1
    file: D:/project/tasia/app/config/_mixins.sass
    line: 28
    column: 3
    formatted: Error: Properties are only allowed w
ithin rules, directives, mixin includes, or other p
roperties.
        on line 28 of app/config/_mixins.sass
        from line 5 of app/blocks/common.sass
>>   font-family: $alias;

What could be the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question