amoktar's avatar

Problem with google fonts

Hello, I'm having a problem with importing google fonts in app.scss

here is my import line from google fonts:

@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Changa:wght@200;400;800&family=Nunito:wght@200;400;800&display=swap');

the compiled css file is break after the semicolon ';'

here is my compiled css

@import url(https://fonts.googleapis.com/css2?family=Amiri:wght@400;

700&family=Changa:wght@200;400;800&family=Nunito:wght@200;400;800&display=swap);@charset "UTF-8";

thanks

0 likes
6 replies
bobbybouwmann's avatar

Have you tried using double quotes instead of single quotes?

bobbybouwmann's avatar

So the problem seems to be the ; that is used in the URL.

Have you tried including the font URL in the <head> tag instead of your CSS, to see if that works?

1 like
bobbybouwmann's avatar

@engamoktar I always use the head tag with these fonts, to be honest. They only need to be loaded to make them work in your CSS of course.

1 like

Please or to participate in this conversation.