0

I want to know how to add scss i tried in below way in default.xml but it's not working

<css src="sass/styles.scss" />

How to achieve this?

Or else give me the proper way how to place and call

1

I don't think this accepts SCSS files, and even if it did your browser can't render them.

What you need to do (unless you're doing something custom) is to pass it a CSS file, and compile your SCSS into CSS.

<css src="path/file-name.css"/>
|improve this answer|||||
  • 1
    I agree with @Ben. Magento 2 only supports LESS out-of-the box and it uses internal LESS-compilation to compile less to css when found. However, if you want to use SCSS, you need to setup your own stack (webpack, browsersync, gulp, whatever) and include the compiled CSS file into your document like this. – Giel Berkers May 17 '17 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.