bwrice's avatar
Level 11

Having trouble importing Google Fonts

Here is my app.scss file:

// Fonts
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
@import url(https://fonts.googleapis.com/css?family=Sigmar+One);

// Variables
@import "variables";

// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

my webpack.mix.js file:

const { mix } = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js('resources/assets/js/app.js', 'public/js')
   .sass('resources/assets/sass/app.scss', 'public/css');

I'm not getting an erros when I run 'npm run dev', but if I try to in-line style elements they're not working. Any help would be greatly appreciated.

0 likes
3 replies
byawitz's avatar

can you please show us your inline css please

bwrice's avatar
Level 11

@byawitz it seems to be working now. Looks like chrome was caching my css so even though I could see the inline styles in the page source, they weren't actually being applied.

pakerole's avatar

Hi ,

I'm having same problem here. I'd restarted Chrome few times, issue persists.

My app.scss

// Fonts
@import url(https://fonts.googleapis.com/css?family=Nunito);
@import url(https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons);

However, if i manually insert the in the blade files, seems resolved the issue. I just wondering what's i did wrong in webpack.

Please help. Thanks

Please or to participate in this conversation.