Is scss backwards compatible with less? I didn't think it was. For example, less prefixes variables with '@' whereas scss prefixes variables with '$'. But even if I replaced the variable prefix, I think there are certain functions/handling specific to each respective preprocessor.
A coworker was insisting that scss is backwards compatible with less. I'm thinking that he may have been confused. Less/scss is backwards compatible with css but I don't think that scss is backwards compatible with less. Can you please confirm?
For basic nested styling, LESS and Sass are generally compatible:
a {
// A styles
B {
// B styles
}
}
will compile to the same thing in both, and some built-in functions will give the same result.
But after that things are quite different. & behaves differently; Sass uses explicit @mixin mixins while in LESS all class definitions are mixins; the built-in functions are different; Sass has if, for, each and while directives, while LESS relies on when guards and mixins that recall themselves; etc.
For your reference
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