cancel
Showing results for 
Search instead for 
Did you mean: 

Working with 3rd Party Module Less in a Sass theme

Highlighted
Occasional Contributor

Working with 3rd Party Module Less in a Sass theme

Hi,

 

I have come across a problem and wanted to know how others have resolved it.

 

My site uses lots of different 3rd party modules and they all come shipped with less. I do not want to convert them to Sass of restyle the modules for various reasons.

So asisde from using snowdog/blank Sass theme and frontools to compile the Sass, I have made a 'web/css/modules.less' file in my theme with the following;

//@magento_import 'source/_module.less'; // Theme modules
//@magento_import 'source/_widgets.less'; // Theme widgets
//@magento_import 'source/_extend.less'; // Extend for minor customization

And I am including 'modules.css' in my page via `default.xml`. This file is rendered with a `magento/bin setup:upgrade`

This seems the neatest solution. All other styles (my own styles) are in Sass and using frontools.

 

The problem

The trouble is that one of my modules' Less requires the Magento UI library (less) in the magento/blank theme. The UI library is not available to my theme as it has been ported to Sass.

The only solution I can think of is to copy the less version of the ui lib in to my theme, so that it's available to the modules. But it doesn't feel right.

 

Any help / thoughts would be much appreciated,

Thanks

Tags (3)