nd_macias
nd_macias

Reputation: 812

Using SASS/SCSS syntax inside <style> tag

Is it possible/allowed to use SASS/SCSS syntax inside .html file in tag? I'd like to define a variable inside .html file and than use it inside .sass file.

Upvotes: 11

Views: 18882

Answers (2)

JsonKody
JsonKody

Reputation: 717

Not inside normal HTML ..

I use it inside Vue template, with installed sass as following:

<style lang="scss">
    /* SCSS here ._. */
</style>

Upvotes: 4

SW4
SW4

Reputation: 71240

Simply put, No, SASS is a CSS preprocessor- if you're looking at implementing variables into your CSS, one way may be to simply apply the variable directly to a class in your document head- as long as it is included in your page after your SCSS output, it will overwrite any other setting for that CSS style.

Upvotes: 10

Related Questions