Skip to content

Tag: sass

Webpack can’t resolve @import of scss/css

I have a main Stylesheet style.scss, which I imported in my main JavaScript file script.js: This works great, and I could build my website that way in dev mode. Now I wanted to try and use separate Stylesheet and import them in my main stylesheet with the @import rule, like so: But now I get this error messag…

How to work with sass @use and webpack sass-loader

In my project i found that i had styles duplications injected into my page, so to solve this problem i have move to @use instead of using @import. After this move i have found that it gave me duplications too even if into the documentation it says that you can use @use without getting duplications. I have fou…

Change only one property of css background

I’m currently trying to dynamically change the background gradient of a background with an image. I’m using the following CSS properties to add the image and the gradient. CSS: The code here is pretty much the same with the only exceptions being the cross-browser compatibility. The only thing I wo…