1

The current project that I'm working on has a requirement that some customers require their own styling (colours, fonts etc). Other customers will use the default styling lovingly crafted by our designer.

I was drawn to using something like LESS so that we would have a different variables file per customer and import that file into every css/less stylesheet where it's needed. The variables files would reside in a different folder for each customer.

The problem I have is how to import/reference the custom varaiables less file into the other stylesheets.

It's an asp.net web site (not MVC).

1
  • Take a look at LESS 1.4.0 (not published in their website yet, but available only on GitHub). You can now use @imports with variables, maybe it'll help you. Commented Jul 1, 2013 at 11:45

1 Answer 1

2

Wrote an MSBuild target to compile all the LESS files for each of the different customers using the dotless compiler. The target uses the FileUpdate task from MSBuildTasks to amend the variables Import statement in each LESS file prior to the compilation task e.g @import '/css/default/variables.less' is changed to '/css/customer1/variables.less' etc.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.