Answer the question
In order to leave comments, you need to log in
What's the problem with the fonts mixin?
Hey!
Updated my mixin for fonts, but gulp throws an error after line 15.
@mixin font-face($font-family, $file-path, $weight: normal, $style: normal, $asset-pipeline: false )
@font-face
font-family: $font-family
@if $asset-pipeline == true
src: font-url('#{$file-path}.eot')
src: local($font-family)
src: font-url('#{$file-path}.eot?#iefix') format('embedded-opentype')
font-url('#{$file-path}.woff2') format('woff2')
font-url('#{$file-path}.woff') format('woff')
font-url('#{$file-path}.ttf') format('truetype')
font-url('#{$file-path}.svg') format('svg')
@else
src: url('#{$file-path}.eot')
src: local($font-family)
src: url('#{$file-path}.eot?#iefix') format('embedded-opentype')
url('#{$file-path}.woff2') format('woff2') - ОШИБКА
url('#{$file-path}.woff') format('woff') - ОШИБКА
url('#{$file-path}.ttf') format('truetype') - ОШИБКА
url('#{$file-path}.svg') format('svg') - ОШИБКА
font-weight: $weight
font-style: $style
Answer the question
In order to leave comments, you need to log in
Because SASS. SASS. Indents. Once again, retreats.
In short, you need to write the entire src in one line
. This is not SCSS for you.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question