Search code examples
angularvisual-studio-codetslint

Error "expectedcss(css-rparentexpected)" on importing css url in angular


I am getting below red error mark in VS code in css file at "400italic". How should I fix this?

Error:- ) expectedcss(css-rparentexpected);

.css

@import url(https://fonts.googleapis.com/css?family=Roboto:400, 400italic, 600, 600italic, 700, 700italic);

Solution

  • The meaning of css-rparentexpected is "Right parenthesis expected", as you can see here.

    The solution is simple, remove all the spaces in the URL, it still works: https://fonts.googleapis.com/css?family=Roboto:400,400italic,600,600italic,700,700italic