A
A
Andrey Frantsev2018-12-06 18:29:51
React
Andrey Frantsev, 2018-12-06 18:29:51

How to connect fonts and CSS Reset to an application on Styled Components?

Good afternoon!
I am creating my first application on Styled Components.
But how to make% Subj, and where to put the font files, taking into account the fact that the fonts should be on our server?
I see 2 ways:
1) Make App.css, stuff @font-face and CSS Reset there, put fonts in public/fonts. Will font-family be visible from Styled Components?
2) injectGlobal (the question remains about performance, and it's not clear where to put the fonts)
or is there 3) ???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2018-12-06
@Andy_Francev

Use @font-face and configure webpack-file-loader for font files.
There is no fundamental difference whether you use injectGlobal or import a scss / css file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question