dotless

Is dotless the same exact syntax as the less css language?

末鹿安然 提交于 2019-12-23 09:29:31
问题 The .less library calls itself a port of ruby LESS library. Can I take away from that that they both are compilers for the same LESS file format or do they expect subtly different less code? Asked another way, am I locking myself in to the dotless library or can use dotless and the less javascript lib on the less files? 回答1: Dotlesscss is a straight (almost 1:1 port) of the JavaScript project less.js (a JavaScript implementation of LessCSS by Cloudhead the original author of LessCss for Ruby)

Empty Bundle using MS Bundling

孤街醉人 提交于 2019-12-21 05:17:20
问题 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

Dotless failing to compile ; in Bootstrap 3 less source

Deadly 提交于 2019-12-18 14:09:09
问题 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

How can I output errors when using .less programmatically?

戏子无情 提交于 2019-12-18 04:05:43
问题 I've written an ASP.NET MVC action method that receives a .less file name, processes it via Less.Parse(<filename>) and outputs the processed css file. This works fine as long as the .less code is valid, but if there is an error, dotLess just returns an empty string. So if there is an error processing the file, my action method returns an empty css file. How can I output an error message with a closer description of the syntax error instead? 回答1: The dotLess parser traps Exceptions and outputs

Rotatable Multi-stop SVG linear gradient mixin

旧巷老猫 提交于 2019-12-13 05:15:57
问题 I have created a multi-stop SVG linear gradient mixin but I am having trouble getting the SVG to scale when rotating to mimic the css3 linears-gradient spec. It works perfectly for horizontal and vertical gradients. At 45, 135, 225 and 315 degrees it also works perfectly but only if the ratio of the object is 1:1. Otherwise, it's just not quite right! I tried playing with preserveAspectRatio="xMaxYMax meet" etc. and tried to get things working with background-size:cover or contain, but

changing dotless parameters dynamically

假装没事ソ 提交于 2019-12-12 10:55:19
问题 I would like to store .less parameters in a DB, an example use case might be that colour changes for each user based on his or her preference. I figure the best way to do this would be to parse all the .less files to get the parameters, the user can then set the parameters which would save in a DB against the user. When the less file is requested a handler overload can query the DB for the parameters. The handler can then output the css with the parameters set. Questions: - How can I take a

Disabling bundling minification for specific file extension

时光总嘲笑我的痴心妄想 提交于 2019-12-11 10:17:39
问题 I'm in the process of switching my site over to less and I was wanting to continue the use of Web.Optimization however, it fails on compiling less. Is there a way to register .less{} as the processor for this or simply tell it to bundle, but not minify anything with a .less extension? 回答1: Take a look at this guide to bundling and minification. It contains an example on bundling LESS files. Essentially you create a class that implements IBundleTransform using System.Web.Optimization; public

Unable to use Less.Parse using dotless in c#

会有一股神秘感。 提交于 2019-12-11 10:13:38
问题 I am following the link https://github.com/dotless/dotless/wiki/Using-.less to minify the css. I have include the dll and made Web.config changes. However when the refer it in index.cshtml as Less.Parse , the Less namespace is not available and and getting the exception "The name Less does not exists in the current context".. can somebody advise what am I missing? 回答1: I have solved it.. just missing parent name space and conversion works like a charm dotless.Core.Less.Parse(css) 回答2: If you

how to change value dynamically variable

最后都变了- 提交于 2019-12-11 08:57:40
问题 how to use dynamically dotless variables. I mean how to assign value dynamically in dotless file. Is there any way? style.less file contain @url_image: #head{ background: url(@url_image) no-repeat left top white;} How can I assign a value at runtime? 回答1: When you say change dynamically in .less file, I am not sure why you wanna just change it in less file. If you just change it in .less file, you'll have to compile the file in order to navigative the change to style.min.css and style.css

Serving dynamic variables to a less file at runtime

风流意气都作罢 提交于 2019-12-11 07:31:52
问题 We have a large ASP.NET MVC application with a large amount of CSS, ~105 distinct files. These files are separated by component, which makes them easier to manage. At runtime, we minify/combine these using a handler. Additionally, our application utilizes skin settings; the administrator can customize fonts and colors for the site. Those skin settings are injected into CSS files using NVelocity, which although it's old is quite performant. I'd like to move the CSS to using less, which will