less

How to Change Default Bootstrap Fluid Grid 12 Column Gutter Width

偶尔善良 提交于 2019-11-27 10:20:44
问题 I am looking to know if there is any simple solution known to change the gutter with on the fluid default 12 grid bootstrap system (2.3.0). I am not familiar with LESS but if that is the answer, please also describe how to could be changed. The same with Sass. Please note that it is perfectly acceptable to change the gutter width, by half or one fourth , for example if that may make things simpler. The following goals must be met: Must be able to update bootstrap in the future. This means not

Visual studio - precompile - dotless

别来无恙 提交于 2019-11-27 10:20:26
问题 I wonder if there is a way to precompile *.less files(http://www.dotlesscss.org/) with visual studio. The site gives me a dotless.compiler.exe but I am not sure how to hook this up to visual studio. I am looking for a solution for both Webforms and ASP.NET MVC. 回答1: Depending on your build environment, you can kick off dotless.Compiler.exe as a build task. For example, using a Pre-Build task in Visual Studio (all 1 line): $(SolutionDir)Tools\dotLess\dotless.compiler.exe -m $(ProjectDir

How to calculate percentages in LESS CSS?

喜你入骨 提交于 2019-11-27 10:09:40
问题 I would like to calculate the width of child-container (div etc) in percentages depending on the parent container with LESS CSS. I am using the forumula by Ethan Marcotte: target / context = result . Parent container: 620px Child container: 140px I am using this calculation: div.child-container { width: (140/620)*100%; } However the output is: div.child-container { width: 0.2258064516129; } I would like to move the decimal point two digits and add the %, like this: div.child-container { width

MVC4 Less Bundle @import Directory

只谈情不闲聊 提交于 2019-11-27 09:40:21
问题 I'm trying to use MVC4 bundling to group some of my less files, but it looks like the import path I'm using is off. My directory structure is: static/ less/ mixins.less admin/ user.less In user.less, I'm attempting to import mixins.less using this: @import "../mixins.less"; This used to work for me before when using chirpy with dotless, but now I noticed ELMAH was getting mad at me, saying this: System.IO.FileNotFoundException: You are importing a file ending in .less that cannot be found.

Less and Bootstrap: how to use a span3 (or spanX [any number]) class as a mixin?

空扰寡人 提交于 2019-11-27 09:33:38
Is it possibile to add span3 class in a mixin to avoid putting it in every element in my HTML? Something like: .myclass { .span3; // other rules... } EDIT I apologize I forgot to specify an important detail: span3 is a standard class of Bootstrap. I didn't find its definition in any file of the Bootstrap framework. ScottS New Answer (requires LESS 1.4.0) What you actually desire is something known as extending in LESS and SASS terminology. For example, you want an HTML element (just an example)... <div class="myclass"></div> ...to fully behave as if it had a span3 class from bootstrap added to

Is it possible to use vh minus pixels in a CSS calc()? [duplicate]

痴心易碎 提交于 2019-11-27 09:31:25
问题 This question already has answers here : Less aggressive compilation with CSS3 calc (4 answers) Closed 3 years ago . I have following CSS rule in a Less file: .container { min-height: calc(100vh - 150px); } Which doesn't work at all. I want to make container full window height and minus header, footer fixed height. How can I do that? 回答1: It does work indeed. Issue was with my less compiler. It was compiled in to: .container { min-height: calc(-51vh); } Fixed with the following code in less

Generate random number in LESS CSS?

戏子无情 提交于 2019-11-27 09:27:18
Tried searching for this but it's difficult given the syntax. Is there any way to generate a random number in LESS? I checked the documentation and don't see anything, but wondered if anyone knew of a trick or undocumented solution. Jason Sperske According to the documentation : JavaScript evaluation JavaScript expressions can be evaluated as values inside .less files. We recommend using caution with this feature as the LESS will not be compilable by ports and it makes the LESS harder to maintain. If possible, try to think of a function that can be added to achieve the same purpose and ask for

Less Css mixin argument list or lists (Object List vs String List)

我与影子孤独终老i 提交于 2019-11-27 08:59:26
say i have this mixin: .loop-strings("A, B, C", "1, 2, 3", "X, Y, Z";); implemented like so: .loop-strings(@list, @index: 1) when (isstring(extract(@list, @index))) { @currentMember: extract(@list, @index); .do-something-with(@currentMember); .loop-strings(@list, (@index + 1)); /* loop the next member */ } .do-something-with(...) { @args1 : e(@arguments); @args2 : A, B, C; args1: @args1; args2: @args2; extract-args1-2: extract(@args1, 2); extract-args2-2: extract(@args2, 2); } The result: args1: A, B, C; extract-args1-2: extract(A, B, C, 2); args1: 1, 2, 3; extract-args1-2: extract(1, 2, 3, 2)

Create a border gradient for each of the 4 borders

做~自己de王妃 提交于 2019-11-27 08:33:22
问题 I want to create the same linear gradient for each border. The border gradient with 5 colors starts from transparent to white to black to white to transparent That way I have transparent corners. How can I do this for all 4 borders? Is it possible to assign a linear-gradient to a border? Sidenote: It should run without too much effort on IE9+ else IE10+ :P 回答1: How about using a radial gradient? Although this is just a mock up, you can see the basic effect. .outer { vertical-align:top;

LESS: Inheritance using a variable

非 Y 不嫁゛ 提交于 2019-11-27 08:26:21
问题 I am learning to use a CSS preprocessor for the first time (LESS) and having trouble with trying to define a class which inherits a class when that parent class is a variable name.. This is basically what I want to do: @import "font-awesome/font-awesome.less" .icon-application-home{ .fa .fa-home; } but as fa is defined in Font Awesome as this: @fa-css-prefix: fa; then the less won't compile, because it doesn't recognize .fa. So I tried this instead: @import "font-awesome/font-awesome.less"