T
T
Treniki2017-08-10 13:14:42
Fonts
Treniki, 2017-08-10 13:14:42

How to properly include fonts in SASS?

Good day.
I want to connect 3 fonts to the project through the @font-face rule in SASS.
Each font is in its own fonts folder and has several formats (otf, ttf, eot, svg, woff).
Found an example online :

@font-face {
  font-family: "Samplina Neue"
  font-style: italic
  font-weight: bold
  src: url("fonts/SamplinaNeue.eot?") format("eot"),
       url("fonts/SamplinaNeue.woff2") format("woff2"),
       url("fonts/SamplinaNeue.woff") format("woff"),
       url("fonts/SamplinaNeue.ttf") format("truetype"),
       url("fonts/SamplinaNeue.svg#Samplina_Neue") format("svg")
}

And, in fact, a number of questions arise on it:
1) Is the presence of rules font-stylein ? 2) Why is there a question mark at the end? 3) Why is there a hash mark and font name at the end? font-weight@font-face
.eot
.svg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andead, 2017-08-10
@Treniki

1) No, it is not .
2) 3) These are hacks for old browsers that don't support the new woff formats.
Watch a recent video from the HTML Academy on this subject , a lot of clarification.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question