Take the 2-minute tour ×
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

As I familiarize myself with Magento's implementation of SASS, I recalled this bit from the Magento 2 wiki:

https://wiki.magento.com/display/MAGE2DOC/CSS+Preprocessing+in+Magento+2#CSSPreprocessinginMagento2-AdoptionofLESS

There is specifically one point that seems confusing:

LESS implementation does not extend Magento 2 requirements with any external libraries, like node.js.

Why the difference between CSS preprocessors between versions? I understand that Magento 2 is a wholly new version, but it seems awkward that SASS would be chosen in 1.9 only to be abandoned in 2.0.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

From Alan Kent himself (eBay Search VP, M2 product technical lead):

SASS is more powerful than LESS, and appears to be gaining more market share over LESS. So why did Magento 2 choose LESS? Sorry, a boring pragmatic reason:

At the time we had to commit to a technology, there were several stable LESS pre-processors available in PHP, but no (stable) PHP implementations for SASS.

The M2 team had put a lot of deliberation and thought into the long-term support of the product beyond the launch date and the amount of risk they were willing to assume. They also needed a LESS/SASS PHP compiler that was a specific license to be able to incorporate into M2. This posed an issue as the most popular PHP SASS compiler is a (somewhat) dormant project maintained by only one developer. Again, this was a deliberate process in the selection.

The CE 1.9/1.14 SASS implementation took a different path to implementation as it was a collaborative effort from 3rd party partners (Classy Llama and Brendan Falkowski) to license a pre-existing framework that Brendan had created and used on multiple builds, including the famous SkinnyTies.com implementation. This was already built in SASS and was to be repurposed by the 3M site build that is touted in the release announcement. 3M was Classy's client and they contracted Brendan to help them deliver it while also being commissioned from Magento 1 team to make it part of the framework. The effort to deliver on-time was driven by the fact that the framework was already in-use and somewhat developed prior to the BF/CL endeavor. Long term support here is probably not such a desperate consideration because of:

  • The proximity of the M2 launch (ETA some time EOY 2015)
  • There is no runtime CSS compilation (M2 requires it)
  • SASS is entirely optional. It is possible to use the new responsive framework without ever recompiling SASS.

TL;DR

<speculation>The decisions were seemingly made insular from each other.</speculation>

Source:

http://alankent.wordpress.com/2014/06/21/magento-2-less-versus-sass-decision/

share|improve this answer
    
So is this to say that M2 will require the use of LESS instead of SASS? –  pspahn Jul 9 at 18:49
    
M2 will support LESS Out of the Box - SASS implementations could be slotted in pretty easily. I imagine this will happen pretty quickly (could happen even today) –  philwinkle Jul 9 at 18:51
    
I think yes. But if they did it right (and I think they did), you can exchange LESS and SASS quite easy. –  Fabian Blechschmidt Jul 9 at 18:51
1  
There's an untold story behind Sass in 1.x for another time. Just a clerical note that the 3M project was Classy Llama only and uses a framework internal to 3M so it's probably the worst reference implementation for the work Classy Llama and I did for Magento, but hey...timing. –  Brendan Falkowski Jul 9 at 19:41
    
Thanks for the info - I'll make the update –  philwinkle Jul 9 at 19:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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