less

Add argument into @keyframes property Less

你。 提交于 2019-12-10 16:25:23
问题 I have a property @keyframes , I compiled with autoprefixer to add the needed prefixes. What I would like to do, is to add an argument to the animation name (or wherever is possible) to change a value of properties into the keyframes key. This is what I have right now : @keyframes loader { 0% { transform: translate(0, -50%) rotate(0deg); } 100% { tranform: translate(0, -50%) rotate(360deg); } } And basically what I would like to do : @keyframes loader(@transform) { 0% { transform: @transform

less css for ubuntu (and compilation automatically)? [closed]

十年热恋 提交于 2019-12-10 16:09:29
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I tried simpless, but is not supported now for linux. I tried with wine, and later another alternatives. I don't want to type: lessc file.less > file.less each time I modify a file. Any good compiler, confortable

Import css file as a block-level import using less

那年仲夏 提交于 2019-12-10 15:16:52
问题 Is there a way to nest the rules of a .css file under a selector by using @import like you can when importing a .less file? If you have a file, "x.less" #x { color: #000; } and file "main.less" .scope { @import "x.less"; } compiling "main.less" results in .scope #x { color: #000; } However, if you have "y.css" #y { color: #111; } and change "main.less" to .scope { @import "y.css"; } compiling "main.less" results in .scope { @import "y.css"; } And if you have "z.css" #z { color: #222; } 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

How to build a less compilation chain (gulp -style) in Webpack v3?

老子叫甜甜 提交于 2019-12-10 15:01:41
问题 For a new project I am bound to keep things webpack-only, and thus need to find a way to efficiently compile our stylesheets. Basically in a very gulh-ish way: gather all less-files including glob-patterns like src/**/*.less (css order may be arbitrary) also allow import of css files like, say ../node_modules/vendor/**/*.css or 3rdparty/master.less (If I have to setup a bogus.js entry point for that, fine...) And with all of that, a typical gulp workflow: transpile less to css merge (concat)

Node.js cannot find module - interfering with cygwin on Windows

别说谁变了你拦得住时间么 提交于 2019-12-10 15:01:40
问题 I'm testing the Bootstrap framework (from Twitter) and try to build it locally after installing Node.js. It fails because it cannot find the less module (which I have also installed with 'npm install -g less'): C:\Users\geir\code\bootstrap>make lessc html/less/bootstrap.less > html/css/bootstrap.css node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: Cannot find module 'C:\cygdrive\c\Users\geir\AppData\Roaming\npm\node_modules\less\bin\lessc' at Function.

dynamically change LESS variables in page with JavaScript

这一生的挚爱 提交于 2019-12-10 14:38:15
问题 I'm trying to use less.js to modify LESS variables dynamically with JavaScript. However, I can't seem to get it to work with modifyVars , watch , or refresh . I tried putting the stylesheet link tag before loading less.js, using less.modifyVars({'@bg': '#00ff00'}) , but no change occurs to the background. The less file I'm using is simple: @bg: #000; body { background-color: @bg; } I also tried putting the stylesheet link tag after less.js, as mentioned in this question, and using less.sheets

Webpack / ES6: how to import stylesheets

霸气de小男生 提交于 2019-12-10 14:37:37
问题 I see repositories like bootstrap starting to include additional tags in their package.json file such as 'style' and 'less.' How can I use these tags to import assets? package.json { "name": "bootstrap", "style": "dist/css/bootstrap.css", "sass": "scss/bootstrap.scss", "main": "./dist/js/npm" } I am using ES6 modules and webpack. I want to do be able to import my stylesheets using the style tag in package.json. Currently I am doing something like this: my_stylesheets.less @import "~bootstrap

How can I call a mixin by reference in LESS?

a 夏天 提交于 2019-12-10 14:17:18
问题 The logical way would be: .mymixin() { sample_key: samplevalue; } @avar: mymixin; .@{avar}(); but I get a parse error. Is there a way to do it? 回答1: Module mixins If you want to call a specific mixin by a reference from a variable you would need to use a parameter, as you can not dynamicaly call parametric mixins by their names . So, the closest to what you want to do, would be using module mixins. It would look like this in LESS : .mixin(mymixin) { sample_key:samplevalue; } .mixin

Is it possible to alias a class or tag to another class or tag in SASS or LESS?

浪尽此生 提交于 2019-12-10 13:04:58
问题 I am trying to make my bootstrap 2.1 markup more semantic using Less or possibly Sass. Consider the following markup for Bootstrap's standard navigation bar: <header id="main-nav" class="navbar navbar-static-top" role="banner"> <nav class="navbar-inner" role="navigation"> <div class="container"> <!-- Collapse nav button --> <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class=