less

Class constructor FileManager cannot be invoked without 'new' in undefined (line undefined, column undefined)

旧城冷巷雨未停 提交于 2019-11-27 20:54:46
解决办法: 1、删除package.json属性devDependencies的 less 和 less-loader ; 2、重新安装 npm i less less-loader --save-dev 3、重新运行npm run dev即可。 来源: https://www.cnblogs.com/zhoudawei/p/11376408.html

Compiling issue in Bootstrap 3 with namespace

爱⌒轻易说出口 提交于 2019-11-27 20:53:58
Any idea why there are certain styles breaking when I compile Bootstrap 3 using Crunch / WinLESS. I'm using this code to namespace bootstrap. .namespace-bs { @import "less/bootstrap.less"; } For most styles it works great but there are a few that turn out like this: .btn-primary .namespace-bs .caret,.btn-success .namespace-bs .caret,.btn-warning .namespace-bs .caret,.btn-danger .namespace-bs .caret,.btn-info .namespace-bs .caret{border-top-color:#fff;} When I would expect them to be like this: .namespace-bs .btn-primary .caret,.namespace-bs .btn-success .caret,.namespace-bs .btn-warning .caret

Java Compiler for Less CSS?

余生颓废 提交于 2019-11-27 20:53:31
问题 I am looking for Java-based Less CSS compilers. On Github, I have stumbled across lesscss4j lesscss-java Both are from the same developer. Unfortunately I cannot quite figure out the difference between them. Can somebody tell me? Which other compilers do you know? 回答1: LESS Engine wraps the javascript compiler in a straight-forward Java interface. I haven't used lesscss-java, so I can't comment on relative quality, but in the small tasks I've needed, I've had no complaints with Less Engine.

Programmatically editing Less (css) code with JQuery-like selector syntax?

此生再无相见时 提交于 2019-11-27 20:53:01
It's possible to use libraries in less.js to dynamically regenerate css from less files within the browser. If there was an easy way to modify less code, this would be an extremely powerful method of dynamically updating a site's css. Imagine you had a colour that was used 100 times throughout a large site. If you wanted to change that color dynamically just using javascript, you would need to update every bit of css that had that colour (perhaps 50 lines of code). With what I'm imagining all you would need to write is something like this: $('@mainColour').value('#F04'); I'm thinking of having

concatenate values in less (css) without a space

非 Y 不嫁゛ 提交于 2019-11-27 20:04:21
So I'm trying to make a LESS mixin which takes a number (degrees to rotate) and output the correct css to rotate the element. The problem is, I can't figure out a way to write both "270deg" and "3" (270/90) for IE. Here are the things i've tried: .rotate(@rotation: 0) { @deg: deg; -webkit-transform: rotate(@rotation deg); // i can see why this doesn't work -moz-transform: rotate((@rotation)deg); // parens -o-transform: rotate(@rotation+deg); // variable-keyword concatenation transform: rotate(@rotation+@deg); // variable-variable concatenation // this is the reason I need @rotation to be just

Bootstrap 3 extra large (xl) columns

怎甘沉沦 提交于 2019-11-27 20:04:04
问题 In Bootstrap's LESS build can someone please tell me how to add a fifth device size, extra large ( col-xl-# )? 回答1: You can create a other less file (for instance bootstrapxl.less), containing the following code and compile that file: @import "bootstrap.less"; // XLarge screen @screen-xlg: 1600px; @screen-xlg-min: @screen-xlg; @screen-xlg-hughdesktop: @screen-xlg-min; // So media queries don't overlap when required, provide a maximum @screen-lg-max: (@screen-xlg-min - 1); //== Container sizes

How do I compile a directory full of less css files to css?

拈花ヽ惹草 提交于 2019-11-27 20:01:54
问题 I have a directory full of less css files. What is the best way to compile them to normal css? (for deployment) Id like to run a command as follows: lessc -r less/ css/ where lessc is the less compiler (installed via node package manager) 回答1: The way to do this is what bootstrap does - have a file which imports all the others and compile that. @import "variables.less"; @import "mixins.less"; 回答2: You can use the following bash one-liner to compile and all less files in a directory and its

ANT script to compile all (css) LESS files in a dir and subdirs with RHINO

谁都会走 提交于 2019-11-27 19:54:33
I want do compile all *.less scripts in a specific folder and it subdirs with less-rhino-1.1.3.js . There is an example on github for doing this for a specific file, which works perfect. But I want to do the same for a complete folder. I tried a lot, here is my last try. It doesn't work, propertyregex seems not to be standard ANT, I don't want to use such things. I am not even sure if this code would work. <project name="test" default="main" basedir="../../"> <property name="css.dir" location="public/css"/> <property name="tool.less" location="bin/less/less-rhino-1.1.3.js"/> <property name=

Generate variables with loops (“Shorter/friendly-named alias for a complex statement” problem)

自闭症网瘾萝莉.ら 提交于 2019-11-27 19:31:57
问题 I know that in LESS is possible to generate many CSS classes using loops. I personally used this technique to answer another user's question. Now I'm facing the following code: @transparent-black-10: fade(@nero, 0.1); @transparent-black-20: fade(@nero, 0.2); @transparent-black-30: fade(@nero, 0.3); @transparent-black-40: fade(@nero, 0.4); @transparent-black-50: fade(@nero, 0.5); @transparent-black-60: fade(@nero, 0.6); @transparent-black-70: fade(@nero, 0.7); @transparent-black-80: fade(@nero

Understanding Bootstrap's clearfix class

北城余情 提交于 2019-11-27 19:13:26
.clearfix { *zoom: 1; &:before, &:after { display: table; content: ""; // Fixes Opera/contenteditable bug: // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952 line-height: 0; } &:after { clear: both; } } Why not use display:block ? In addition, why does it also apply to the ::before pseudoclass? .clearfix is defined in less/mixins.less . Right above its definition is a comment with a link to this article: A new micro clearfix hack The article explains how it all works. UPDATE: Yes, link-only answers are bad. I knew this even at the time that I posted this answer, but I didn't