dotless

DotLess LessCss compiler is different to WebEssentials LessCss compiler

让人想犯罪 __ 提交于 2019-12-11 06:16:46
问题 I'm using dotless to parse LessCss at runtime. This is mostly successful but I have one scenario where it doesn't work as intended. Given the following LessCss: @tileWidth: 50px; @tileMarginX: 5px; @gridWidth: 2; // recursive less to generate all x positions down to 1 .position-x(@maxIndex) when (@maxIndex > 0) { [data-col="@{maxIndex}"] { left: ((@maxIndex - 1) * @tileWidth) + (@tileMarginX * ((@maxIndex * 2) - 1)); } .position-x(@maxIndex - 1); } .position-x(@gridWidth); WebEssentials 2013

LESS svg-gradient() function with multiple variables

不羁岁月 提交于 2019-12-11 05:03:59
问题 I cannot seem to send multiple variables to the svg-gradient() function in less. If I don't use variables, the svg-gradient function works fine. (Except for the non-increment of ids - but that's something else entirely!) Or if I send the exact same data to the CSS property, linear-gradient(), which is the same format that the svg-gradient() function requires, it works also. Can anyone tell me why the commented lines in the code below are not successfully compiling when the ones above and

dotless on Azure Web Project doesn't understand &:extend

北城余情 提交于 2019-12-10 15:11:07
问题 I'm using Azure SDK 2.2 and created a brand new MVC 5 web project. I added dotless, bootstrap-less (and subsequently updated to the latest LESS from getbootstrap.com), and font-awesome. I'm updated to the latest of everything and resolved the issue where dotless added a section to my web.config file and caused the project to return a 500 internal server error. That configuration has moved to according to the error. Now the page loads, but there is an issue with the bootstrap compilation from

Import LESS from server

早过忘川 提交于 2019-12-09 03:19:30
问题 In my ASP.NET MVC application I have an action that returns LESS variables. I would like to import these variables into my main LESS file. What is the recommended approach for doing this since DotLess will only import files with .less or .css extensions? 回答1: I found the easiest solution was to implement IFileReader . The implementation below makes a HTTP request to any LESS path prefixed with "~/assets", otherwise we use the default FileReader . Note that this is prototype code: public class

Why does a LESS file have to be set as Build Action “Content” to deploy to Azure?

a 夏天 提交于 2019-12-08 20:41:06
问题 I have an Azure website. I also have dotless running in my MVC app to translate and bundle Less files. When I deploy a release build to Azure, the Less file returns 404 unless I set it to Build Action="Content" in it's properties. Once I change that setting, everything works as expected. So, I no longer have an issue, except I don't understand why it has to be set to Content. Can someone explain? 回答1: Build Action="Content" tells the publishing process that this file should be copied as-is to

Dotless File Yields 404 Error in IIS

若如初见. 提交于 2019-12-04 19:05:45
问题 I've been successfully using .less files in my dev Cassini server (with dotless) for a few weeks but when I publish to my local IIS server they yield 404 errors. Attaching my debugger to IIS yields no exceptions. I've restarted my IIS app pool and server as well. Any ideas? 回答1: Looks like you're missing a mime type on IIS. For IIS7 add the following to your web.config : <system.webServer> <staticContent> <mimeMap fileExtension=".less" mimeType="text/css" /> </staticContent> </system

Empty Bundle using MS Bundling

时间秒杀一切 提交于 2019-12-03 16:38:16
I am using asp.net mvc4 and the built in bundling and minification that is provided by MS using the System.Web.Optimization library (1.1.0) with a custom LessTransform using dotless. The site is hosted in IIS 7. My problem is that intermittently the bundle is empty on the website which causes the website to load all weird. http://site/Content/surveycss? What could cause this? UPDATE I read that if the less compiler encounters an error it could result in an empty bundle. I've tested the less for errors and there are none. I discovered that there maybe an issue with the way that the bundle was

Dotless File Yields 404 Error in IIS

会有一股神秘感。 提交于 2019-12-03 11:35:46
I've been successfully using .less files in my dev Cassini server (with dotless ) for a few weeks but when I publish to my local IIS server they yield 404 errors. Attaching my debugger to IIS yields no exceptions. I've restarted my IIS app pool and server as well. Any ideas? Looks like you're missing a mime type on IIS. For IIS7 add the following to your web.config : <system.webServer> <staticContent> <mimeMap fileExtension=".less" mimeType="text/css" /> </staticContent> </system.webServer> For IIS6 you can do (presuming you have administrator RDP access): cscript adsutil.vbs set W3SVC/1/Root

HTTP Error 500.23 after adding dotless to my local website

家住魔仙堡 提交于 2019-12-03 09:10:55
问题 Hi I'm trying to run dotless on my local .net4 web site My web config looks like this: <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core" /> </configSections> <system.web> <compilation debug="true" targetFramework="4.0" /> <httpHandlers><add path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler, dotless.Core" /></httpHandlers></system.web> <dotless minifyCss

Dotless failing to compile ; in Bootstrap 3 less source

萝らか妹 提交于 2019-11-30 11:03:02
I use dotless 1.3.1.0 compiling less-files. This worked fine with bootstrap 2.x, but after switching to bootstrap 3.0.0 (downloaded the source from here: http://getbootstrap.com/getting-started/ ), I suddenly get this error: Expected ')' but found ' ' on line 47 in file 'mixins.less': [46]: // Sizing shortcuts [47]: .size(@width; @height) { ------------^ [48]: width: @width; Seems that having a ; as seperator between parameters is not valid less. The original source in the mixins.less looks like this: ... // Sizing shortcuts .size(@width; @height) { width: @width; height: @height; } ... Do I