Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include 'normalize-scss' in Vue CLI 3

Just added the package normalize-scss to my new Vue project, but none of the styles are being applied... I've tried both:

@import 'normalize-scss' in my styles.scss

import 'normalize-scss' in my main.js page

Am I doing something wrong? The package is clearly there because the app runs, but it doesn't actually apply any css rules.

like image 724
Modermo Avatar asked May 12 '26 06:05

Modermo


2 Answers

I figured it out. You need to put the normalize() after you import it, in your main.scss file. So:

@import 'normalize-scss';
@include normalize();
like image 169
Modermo Avatar answered May 14 '26 02:05

Modermo


after installing it with npm import it at the top of main.js file:

import "normalize.css"
like image 43
behnam Avatar answered May 14 '26 03:05

behnam