Skip to content

Including fonts in base _fonts.scss #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
just2jays opened this issue Feb 23, 2018 · 1 comment
Closed

Including fonts in base _fonts.scss #49

just2jays opened this issue Feb 23, 2018 · 1 comment

Comments

@just2jays
Copy link

I'm unable to use the Google fonts via @import in the ./common/css/base/_fonts.scss partial.

It seems as if the @import statement is being rendered rather than the contents of the font url request.

For instance, if I clone this repo and simply add another Font import underneath the included "Open Sans" @import url('https://fonts.googleapis.com/css?family=Roboto'); - I'm unable to reference this Roboto font.

Am I missing a step here?! Thanks for any help.

@calvinl
Copy link
Member

calvinl commented Feb 24, 2018

@just2jays Good catch!

It looks like it's a precedence issue in this line of code here. Basically, webpack is compiling css modules since App is imported before the styles file is.

Try moving the styles import to line 2, and it should fix the issue.

e.g.

import 'babel-polyfill';
import './styles';
// ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants