less

Can Visual Studio 2013 generate CSS files from .less files?

不问归期 提交于 2019-12-20 10:15:05
问题 Visual Studio 2013 is awesome, now with syntax highlight and autocomplete for .less files. But does it also generate the respective CSS files? Do I need to install other extensions for that? 回答1: Yes, Visual Studio 2013 doesn't come with a LESS compiler built-in so you'll need to bring your own. You can either use an external compiler, or install an extension so you can compile your LESS files from within the IDE. 回答2: If you don't want to install plugins in your Visual Studio , you can use

Bootstrap 3: How to set default grid to 960px width?

烈酒焚心 提交于 2019-12-20 09:39:57
问题 I'm working with Bootstrap 3 and the client wants the website container width to be set to 960px. Do I directly edit the CSS file or what is the best way to do this? I heard something about "Less". Do I customize the download? Thanks! Update: the site does NOT need to be responsive, so I can disable that responsive-ness and just add the 960px width to the CSS and be done with it or does this cause problems elsewhere? 回答1: For Bootstrap3, you can customize it to get 960px by default (http:/

How to install lessc and nodejs in a Python virtualenv?

﹥>﹥吖頭↗ 提交于 2019-12-20 09:06:12
问题 I would like to install a nodejs script (lessc) into a virtualenv. How can I do that ? Thanks Natim 回答1: I like shorrty's answer, he recommended using nodeenv, see: is there an virtual environment for node.js? I followed this guide: http://calvinx.com/2013/07/11/python-virtualenv-with-node-environment-via-nodeenv/ All I had to do myself was: . ../bin/activate # switch to my Python virtualenv first pip install nodeenv # then install nodeenv (nodeenv==0.7.1 was installed) nodeenv --python

Is there a way to use variables in Less for the ~ operator, like ~“calc(100% - @spacing)”;

Deadly 提交于 2019-12-20 08:31:15
问题 Is there a way to use variables in less ~ operator, like ~"calc(70% - @spacing)"; When I have tried it it only works with static values like ~"calc(70% - 10px)"; Can I get the string to be evaluated prior to beeing set as a property. 回答1: To disable the calculation which LESS does automatically when discovering a - between two numeric values but still being able to use variables, you can write one of the following: 1) Only escape the operator that triggers the calculation and use the variable

Modify alpha opacity of LESS variable

我的梦境 提交于 2019-12-20 08:19:57
问题 Using LESS, I know that I can change the saturation or tint of a color variable. That looks like this: background: lighten(@blue, 20%); I want to change the alpha opacity of my color, though. Preferably like this: background: alpha(@blue, 20%); Is there a simple way to do this in LESS? 回答1: The site documentation gives the answer: background: fade(@blue, 20%); The function name is fade not alpha according to that document. 回答2: For completeness fade Set the absolute transparency of a color.

Bootstrap Icons not showing in published ASP.NET MVC application

时光总嘲笑我的痴心妄想 提交于 2019-12-20 08:18:07
问题 --- NB: Go to the EDITED 2 section for summary ---- I have an ASP.NT MVC (4) application. I integrated (twitter)Bootstrap to it. Bootstrap is working perfectly, but the icons does not show correctly when I publish the application. I tried to republish the application without success. For clarify I put some images here below. When I run my application from VS2013 the result is this (which is OK): In booth, IE and Chrome. But when I run the published application the result is this (which is NOT

How to apply less functions to gradient colors?

不羁的心 提交于 2019-12-20 05:01:34
问题 I am new in less. I want to apply less functions to the gradient colors. I have tried best of my knowledge but I couldn't get the output. Can any one please suggest me the correct way to get the less function derived colors. I tried the below codes. @input: #fff , #aaa 25%, #ccc 50%, #000 100%; @light: 10%; @dark: 20%; div{ .custom-grad(@input, @light, @dark); } .for(@array) when (default()) {.for-impl_(length(@array))} .for-impl_(@i) when (@i > 1) {.for-impl_((@i - 1))} .for-impl_(@i) when (

Why is this Less expression a syntax error depending on the math operation?

末鹿安然 提交于 2019-12-20 04:44:06
问题 I have the following snippet of Less: @Foo: 50px; .someClass { width: calc(~'(100% - @{Foo}' - 5px); } This works fine. However, if I change this to: @Foo: 50px; .someClass { width: calc(~'(100% - @{Foo}' + 5px); } We now have a ParseError . We're on a bit older version of Less, but I've tried it on the official Less preview site and it still breaks. Is this a bug or am I doing something silly? 回答1: This is a very interesting case. The below code compiles fine and produces the expected output

Angular 6 - Less CSS' import is not working anymore

孤街醉人 提交于 2019-12-20 04:34:09
问题 I wanted to re-use some structure from an Angular 5 project which uses Less. In this old project I could simply load .less files using this line from within a component: @import '~app/shared/less/bootstrap'; This would load: /my-app/src/app/shared/less/bootstrap.less Now I have a blank Angular 6 project, which is also configured to use Less as a preprocessor: ng new my-app --routing --style less Extract from angular.json : "my-app": { "prefix": "app", "schematics": { "@schematics/angular

LESS: associative array in LOOP

杀马特。学长 韩版系。学妹 提交于 2019-12-20 04:32:26
问题 I need to add an icon to a page, depending by its content. In other words, if a page contain an image, a gallery, a video... I'll add an icon indicating its nature. To do this, I add CSS class to body tag and use descendant selector to add icons in the proper position. Obviously this task results in a lot of repeating code in CSS, so I would like to generate it with a LESS Loop. Here my actual attempt ( icons are icon-fonts ): @icons:"\e926", "\e90e", "\e914"; .icons-loop(@i; @ico) when (@i <