less

Multiple properties are getting treated as separate arguments in mixins

主宰稳场 提交于 2019-11-27 13:37:48
I'm trying to write a mixin, but I can't seem to get the arguments working the way I want: multiple properties are getting treated each as a separate argument. Current Code .transition(@property: all, @time: 1s, @timing: ease-in-out) { -moz-transition: @property @time @timing; -webkit-transition: @property @time @timing; -o-transition: @property @time @timing; transition: @property @time @timing; } a { .transition(color, opacity, .5s); } Desired Output a { -moz-transition: color, opacity .5s ease-in-out; -webkit-transition: color, opacity .5s ease-in-out; -o-transition: color, opacity .5s ease

Tweaking Bootstrap 2.0 for Semantic Markup

孤者浪人 提交于 2019-11-27 13:35:00
问题 Version 2 of Twitters "Bootstrap" UI framework was released today. While I find it very handy, I dislike how non-semantic it is. I'd rather avoid setting classes like .span6 .table-striped in my HTML. Since Bootstrap is built on less, I'm expecting that there's a good way use a project-specific less sheet that can leverage mixins to to ascribe bootstrap-defined goodness to nice semantic class names. I cloned bootstrap.less into myproject.less, and adjusted the paths in the @import lines, then

动态样式语言Scss&Less介绍与区别

只谈情不闲聊 提交于 2019-11-27 11:56:08
一. Sass/Scss&Less是什么? Sass (Syntactically Awesome Stylesheets)是一种动态样式语言,语法跟css一样(但多了些功能),比css好写,而且更容易阅读。Sass语法类似与Haml,属于缩排语法(makeup),用意就是为了快速写Html和Css。 Less 一种动态样式语言. 将CSS赋予了动态语言的特性,如变量,继承,运算, 函数. LESS 既可以在客户端上运行 (支持IE 6+, Webkit, Firefox),也可一在服务端运行 (借助 Node.js)。less 中文站 Sass与Scss有什么差别 Sass原先跟Haml一样的缩排语法,对于写惯Css的前端来说是很不直观的,也不能将原来的Css加到Sass里面,因此Sass改良了语法,Sass 3就变成了Scss(Sassy CSS)。与原来的语法兼容,只是用{}取代了原来的缩进。 Sass .content margin:10px auto h1 font-size:24px; Scss .content{ margin:10px auto h1{ font-size:24px; } } 二. Sass/Scss&Less区别? 1.Sass是基于Ruby的,是在服务端处理的,而Less是需要引入less.js来处理Less代码输出Css到浏览器

Less-学习前的准备工作

亡梦爱人 提交于 2019-11-27 11:55:07
学习less,我们肯定要有相应的环境,我们预览网址 http://www.1024i.com/demo/less/ 提供了2种方法,我们采用服务端用法,不过只是用前半部分,就是把写好的less文件转为css文件,html引用的还是css文件,仅仅作为css开发工具 我们要做的一些工作 1.nodejs的安装,这个不多说 http://my.oschina.net/u/2352644/blog/487488 2.安装less,我们进入cmd窗口执行 npm install -g less 3.检测less是否安装 lessc -v 4.都无提示表示成功安装,这些步骤非常简单 5.我们创建一个文件夹,我的叫 lessdemo,下面创建demo.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>less</title> <link rel="stylesheet" type="text/css" href="less.css"/> </head> <body> <div class="demo">less</div> </body> </html> 6.我们在lessdemo下创建less.less文件,里面会写入被less支持的语法,less对css兼容,我们放入一段原生css .demo{ height:

Height not 100% on Container Fluid even though html and body are

时光怂恿深爱的人放手 提交于 2019-11-27 11:48:09
问题 I have the following layout (I'm using Meteor): <template name="headerFooter"> <div class="container-fluid fill-height"> {{> header}} {{> UI.contentBlock}} {{> footer}} </div> </template> <template name="home"> {{#headerFooter}} <div class="row body-film"> <div id="newsfeed" class="col-sm-offset-7 col-sm-5 block-film"> {{#each stories}} <div class="story">...</div> {{/each}} </div> </div> {{/headerFooter}} </template> and this (relevant) css backing it up: html { height: 100%; } body { min

How to compile Twitter Bootstrap 3.0 LESS using Asp.net MVC 5 and Web Essentials 2013

大城市里の小女人 提交于 2019-11-27 11:42:19
问题 I've set up Visual Studio 2013 RC and Web Essentials 2013 . I'm trying to create an Azure Cloud Service and a Web Role using ASP.Net MVC 5 . Installed Twitter Bootstrap Less Source 3.0 and wanted to bundle all less files using Web Essentials 2013. I did not get any help or documentation on how to go about bundling bootstrap.less at run time or compile it into a bootstrap.css at design time. Any idea how it can be done? Is there any simpler way than BundleTransformer.Less. 回答1: UPDATE (29-SEP

lessc binary not available after installing less via NPM

房东的猫 提交于 2019-11-27 11:31:23
问题 I went ahead and installed and tested node.js and then I installed LESS CSS via NPM but when I type in the command lessc styles.less or lessc styles.less > styles.css It tells me -bash: lessc: command not found I'm in MAC Lion Terminal program EDIT : After installing Node you need to run this command ln -s ~/.npm/less/1.2.1/package/bin/lessc (path to directory you want) Then you will be able to run less on any of the less files in that directory. It works but it's not compiling the imports

How to use if statements in LESS

蹲街弑〆低调 提交于 2019-11-27 11:06:00
I'm looking for some kind of if-statement to control the background-color of different div elements. I have tried the below, but it doesn't compile @debug: true; header { background-color: (yellow) when (@debug = true); #title { background-color: (orange) when (@debug = true); } } article { background-color: (red) when (@debug = true); } freejosh LESS has guard expressions for mixins, not individual attributes. So you'd create a mixin like this: .debug(@debug) when (@debug = true) { header { background-color: yellow; #title { background-color: orange; } } article { background-color: red; } }

Reference a class/mixin without completely importing the LESS file

China☆狼群 提交于 2019-11-27 11:04:35
问题 I'm using the roots theme for wordpress: https://github.com/retlehs/roots/ It already comes with a precompiled bootstrap.css and recommends to use app.css for any customizations. As I don't have the options to add the classes to the buttons via html or javascript, I'd like to use the LESS sources to reference a css class, for example, I want to give a submit button the bootstrap button style: input#submit{ .btn; .btn-primary; } If I use @import 'bootstrap.less'; it adds the entire bootstrap

Codeforces 915E Physical Education Lessons

假装没事ソ 提交于 2019-11-27 10:59:38
题意简述 维护序列,支持以下操作: 区间赋1/0 求整个区间之和 题解思路 珂朵莉树暴力赋值,查询 代码 #include <set> #include <cstdio> #include <cctype> #define IT std::set<Node>::iterator #define getc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++) char ch,buf[1<<21],*p1=buf,*p2=buf; inline void read(int& x) { for (ch=getc();!isdigit(ch);ch=getc()); for (x=ch-'0';isdigit(ch=getc());x=x*10+ch-'0'); } int q,l,r,opt,sum; struct Node { int l,r; bool v; Node(const int& L,const int& R,const bool& V):l(L),r(R),v(V) {} bool operator <(const Node& x) const { return l<x.l; } }; std::set<Node> s; inline IT split(const int& x) { IT