Picture of 360 elearning
Adding a new less file to theme
by 360 elearning - Monday, 2 March 2015, 4:36 AM
 

Respected

As i am working with adapt framework to add make courses, I need to make some customization to its style.

 

Now what I need to add an new file called custome_style.less to themes less folder to override some specific styles. But I cannot under stand where to include its path?

 

Thanks in advance

 

Regards

Picture of Łukasz Grela
Re: Adding a new less file to theme
by Łukasz Grela - Tuesday, 3 March 2015, 8:54 AM
 

You do not have to add any new files, you can put the overriding CSS rules in the theme.less

but if you really want to you can add it to the "theme" folder e.g. here src\theme\adapt-contrib-vanilla\less\ and it should be compiled automatically as the Gruntfile.js is taking all *.less files from that folder.

Picture of Nils Sanderson
Re: Adding a new less file to theme
by Nils Sanderson - Monday, 9 March 2015, 11:34 AM
 

Hi 360 elearning,

Lukasz' response would be the correct approach, in using the theme.less for your customisations.

However, if you do create a new file, make sure you give your styles the correct specificity, as the less files get compiled in alphabetical order. So if you create a new file advanced.less this would be compiled first and if it has the same specifity as some of the other stylesheets you won't see any changes.

I am sure you would have figured this out but just incase it saves any headaches.

Thanks,

Nils