Sublime Text Less2Css Disable Auto Calculation

I am using Sublime Text with Less2Css to Css- and minify my less files. I want to set the max-height of a container to 100% - 20px like so:

max-width: calc(100% - 20px);

Unfortunately the Less2Css minifies '100% - 20px' to '80%'. Are there any workarounds? Can I somehow tell Less2Css not to minify anything surrounded by special characters (e.g. **max-height: calc(100% - 20px);**)?

Answers


You can place it in a string and the escape it.

This, in Less:

.section {
    max-width: ~'calc(100% - 20px)';
}

will generate this CSS:

.section {
  max-width: calc(100% - 20px);
}

Need Your Help

Opening database in invalid location causes memory leak

c++ linux qt sqlite valgrind

I am using qt 4.5.3 to access the sqlite database, like this :

autocomplete api php conversion error

php api autocomplete

I am trying to use api.autocomplete.com api

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.