I have seen in a tutorial http://www.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/, that we can write javascript inside less file, I wanted to know is it also possible to write javascript in scss files ?
Asked
Active
Viewed 220 times
0
-
Judging by how the comparison of LESS and SASS says that it is a feature of LESS, without mentioning SASS, I would imagine it is not possible. – Anonymous Jun 30 '15 at 12:49
1 Answers
3
No. JavaScript is not valid SCSS or SASS (indented) syntax. Sass has its own "language" and it only compiles to CSS.
You could use the deprecated CSS expressions, but I don't recommend it.
-
Yes you are correct that SASS compile to css, but I am concerned how the link http://www.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/, in sectoon "JAVASCRIPT EVALUATION" shows [ @string: `'howdy'.toUpperCase()`; /* @string becomes 'HOWDY' */ ]. toUpperCase() is a js function. – user2243301 Jul 01 '15 at 13:44
-
Uh huh, that's LESS, not Sass. Almost all of the examples on that page are LESS. – cimmanon Jul 01 '15 at 13:51