Share

Rubén Rodríguez, Front End Developer in Interactiv4 tells us how to use Susy in Magento 2

21 April, 2017

Our partner Rubén Rodríguez tells us how he has used Susy in Magento 2, Rubén is Front End Developer in Interactiv4 and with this post illustrates the doubts that may arise in the development of a project in Magento 2. Without further delay we leave you with this pearl of wisdom.

With the development of a new project in Magento 2 there may be a need to add a grid system to a template. A good alternative instead of using frameworks such as Bootstrap or Foundation is to use Susy, an engine to generate custom layouts with SASS

Previous requirements

  • Node JS – http://nodejs.org
  • Bower – http://bower.io
  • Gulp Js – http://gulpjs.com

I count on the premise that the LESS compiler of Magento 2 is not being used in favor of Gulp and SASS, using its own Gulpfile or the fantastic Snowdog Frontools module. You can find information on how to work with SASS in Magento 2 in Magento Dev Docs and Magento Forums.

 

Installing Bower Packages

We are located from the terminal at the root of the project.

Screenshot (25)

 

The new structure of the project is as follows:

Screenshot (26)
If we want to be able to use the breakpoint functions of Susy:

Screenshot (27)

Now we only have to add the packages to our styles.scss

Screenshot (28)

Ready! With this you can already compile SASS files with Gulp using Susy.

Sources: Susy Sass

Category
Author
Senior Front-end Developer

Share

Subscribe to our newsletter

You may also like

We use third party cookies to improve our services and obtain statistical data of your browsing habits. If you continue browsing we consider that you accept its use. You can get more information at Privacy policy and cookies