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.
SASS and SCSS can import each other. Sass actually makes CSS more powerful with math and variable support. Let's list down the main difference between SASS and SCSS. SASS is used when we need an original syntax, code syntax is not required for SCSS.
With Sass (Syntactically Awesome StyleSheets) your CSS code will be also awesome. Sass is a CSS preprocessor with a lot of powerful features. The most notable features are variables, extends, and mixins. Variables store information that can be reused later, like colors or other commonly used values.
Not inside normal HTML ..
I use it inside Vue template, with installed sass as following:
<style lang="scss">
/* SCSS here ._. */
</style>
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With