This is a migrated thread and some comments may be shown as answers.

LESS variable imports

3 Answers 126 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marcel
Top achievements
Rank 1
Marcel asked on 15 Aug 2014, 02:51 PM
Hello,

I'm using the kendo less files in my web application (MVC5 web-api SPA) and i would like to use the variables
from a Theme file (for example kendo.bootstrap.less), but i run into a problem with my own less files.

When i use an import directive @import "kendo.bootstrap.less" in my own Site.less file, Visual Studio 2013 Web Essentials
parses the entire kendo.bootstrap.less and adds everything to the resulting Site.css file.

Because it is impossible to only import variables from another less file, wouldn't it be an idea to keep those variables in a separate less file like kendo.bootstrap.vars.less ?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 15 Aug 2014, 03:11 PM
Hello Marcel,

If you wish to create a separate theme, you need to copy (rather than include) the theme less file. Overriding of theme variables is not supported at this time.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Marcel
Top achievements
Rank 1
answered on 15 Aug 2014, 03:52 PM
Hey Alex,

It's not that i want to override theme variables.
I want to import them into my site.less to use them, so i don't have to copy colors etc and create new variables in my site.less file.
I know i could just create a vars.less file and import that into kendo.bootstrap.less as well as in my site.less,
but it would be broken by future kendo updates.

Regards,
Marcel
0
Alex Gyoshev
Telerik team
answered on 19 Aug 2014, 06:52 AM
Hello Marcel,

Indeed, this is a sensible request. I am afraid that this change will require quite a few changes to our build process in order for us to implement it right away. Would you be so kind to suggest it on UserVoice so that it gets some votes before it is implemented? Until then, removing the last @import line from kendo.theme.less will convert the file to what you need.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Marcel
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Marcel
Top achievements
Rank 1
Share this question
or