less

Less mixin issue for multiple box-shadow arguments

独自空忆成欢 提交于 2019-12-02 01:07:51
问题 I'm working in a project were i have to use less, personally I always use stylus, but I can't with this project, so I have the next question. how can i do this, that i'm doing with stylus, with less ? The problem is the number of arguments. in stylus : box-shadow() -webkit-box-shadow arguments -moz-box-shadow arguments box-shadow arguments .div { box-shadow 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.2), inset 0 10px rgba(255, 255, 255, 0.2), inset 0 10px 20px rgba(255,

Linux查看打日志文件

半腔热情 提交于 2019-12-02 00:43:06
1.如果文件比较小的话,使用vim直接查看,如果文件比较大的话,使用vim会直接卡主 2.如果想要查看正在滚动的日志文件.这个命令可以查看大文件. tail -f file Ctrl+c 终止tail命令 Ctrl+s 暂停tail命令 Ctrl+q继续tail命令 3.如果文件比较大的话,也可以使用less命令 less file 但是使用上述命令的坏处是,默认打开的位置是第一行,并且当切换到实时滚动模式(按F,实现效果类似于tail -f 效果)过着想要滚动到最底部的时候(按G)会卡在计算行一段时间,如果卡的时间比较长的话,可以直接按Ctrl+c,取消计算行数. 我更推荐打开文件的时候使用 -n,不计算行号(打开大文件的时候,很有用.) less -n file less +G -n file // 打开文件的时候,直接定位到文件的最底部,默认情况下是在首行。 less +F -n file // 打开文件的时候,使用实时滚动模式,Ctrl + c 退出实时滚动模式,按 F 切回实时滚动模式 less +1000g -n file // 直接定位到第 1000 行,一般你提前通过 grep 命令,定位到行数后,再使用这个命令 less +50p -n file // 直接定位到 50% 的位置 less +50P -n file // 直接定位到第 100 字节的位置

How do I build the Rhino specific versions of less?

旧街凉风 提交于 2019-12-01 23:42:51
问题 I want to run the latest version of less from Java, for this (I believe) I need the Rhino specific versions of less. From the less website: Each less.js release contains also rhino-compatible version. But this appears to have been not the case since v1.7.5. So I've installed NPM, installed Grunt, downloaded the less source from GitHub, ran grunt -help to find the rhino task but have fallen at the last hurdle: C:\Temp\less.js-2.5.0> grunt rhino Running "browserify:rhino" (browserify) task

How can I customize the CSS generated by LESS to include Font Awesome?

我是研究僧i 提交于 2019-12-01 23:25:03
问题 I want to customize Bootstrap's CSS by layering in Font Awesome as a replacement for Bootstrap's default Glyphicons. How can I customize the CSS generated by LESS to include Font Awesome in a way that won't break if I update the core Bootstrap files? Note: Font Awesome suggests altering the core Bootstrap 'bootstrap.less' file to replace @import "sprites.less"; with @import "path/to/font-awesome/less/font-awesome.less"; , but this change would get overwritten if the Boostrap core were to be

How do I build the Rhino specific versions of less?

陌路散爱 提交于 2019-12-01 22:39:11
I want to run the latest version of less from Java, for this (I believe) I need the Rhino specific versions of less. From the less website : Each less.js release contains also rhino-compatible version. But this appears to have been not the case since v1.7.5 . So I've installed NPM, installed Grunt, downloaded the less source from GitHub, ran grunt -help to find the rhino task but have fallen at the last hurdle: C:\Temp\less.js-2.5.0> grunt rhino Running "browserify:rhino" (browserify) task Verifying property browserify.rhino exists in config...ERROR >> Unable to process task. Warning: Required

LESS Silent Multiline Comment

两盒软妹~` 提交于 2019-12-01 22:29:32
问题 Is there a way to create silent multiline comments in LESS? I want same behaviour as //comment, but for multiline strings. 回答1: As already made clear by @harry the -x and clean-css options remove comments too. Since version 2 the clean-css option has been moved into a plugin ( npm install -g less-plugin-clean-css ). Since Less 2 you can use plugins, see also http://lesscss.org/usage/#plugins ,so you can write and use a plugin which removes your multiline comments. Example: Download and unzip

Less mixin issue for multiple box-shadow arguments

岁酱吖の 提交于 2019-12-01 21:34:58
I'm working in a project were i have to use less, personally I always use stylus, but I can't with this project, so I have the next question. how can i do this, that i'm doing with stylus, with less ? The problem is the number of arguments. in stylus : box-shadow() -webkit-box-shadow arguments -moz-box-shadow arguments box-shadow arguments .div { box-shadow 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.2), inset 0 10px rgba(255, 255, 255, 0.2), inset 0 10px 20px rgba(255, 255, 255, 0.2), inset 0 -15px 30px rgba(0, 0, 0, 0.2) } .div2 { box-shadow 0 2px 8px rgba(0, 0, 0, 0.3) }

LESS Silent Multiline Comment

十年热恋 提交于 2019-12-01 21:34:20
Is there a way to create silent multiline comments in LESS? I want same behaviour as //comment, but for multiline strings. As already made clear by @harry the -x and clean-css options remove comments too. Since version 2 the clean-css option has been moved into a plugin ( npm install -g less-plugin-clean-css ). Since Less 2 you can use plugins, see also http://lesscss.org/usage/#plugins ,so you can write and use a plugin which removes your multiline comments. Example: Download and unzip clean-css into your working directory. You can find clean-css at https://github.com/jakubpawlowicz/clean-css

ModifyVars issue when trying to change variables one by one

做~自己de王妃 提交于 2019-12-01 20:59:40
I am having a big issue trying to make a live customization section for my website. I want to be able to modify each variable from my LESS file in the browser when a value is added in the field and see the result immediately in the browser. For example: $('#txtBaseColor > .form-control').change(function(){ var bgBase = $(this).val(); less.modifyVars({ '@bgBase': bgBase }); }); // Base bckg color change $('#txtBaseTextColor > .form-control').change(function(){ var cBaseContrast = $(this).val(); less.modifyVars({ '@cBaseContrast': cBaseContrast }); }); I know the modifyVars function provided by

How can I customize the CSS generated by LESS to include Font Awesome?

↘锁芯ラ 提交于 2019-12-01 20:27:15
I want to customize Bootstrap 's CSS by layering in Font Awesome as a replacement for Bootstrap's default Glyphicons . How can I customize the CSS generated by LESS to include Font Awesome in a way that won't break if I update the core Bootstrap files? Note: Font Awesome suggests altering the core Bootstrap 'bootstrap.less' file to replace @import "sprites.less"; with @import "path/to/font-awesome/less/font-awesome.less"; , but this change would get overwritten if the Boostrap core were to be replaced (by a version upgrade, for example). Similar to my earlier question (" How can I customize