less

Dynamic CSS in Rails asset pipeline, compile on fly

你说的曾经没有我的故事 提交于 2019-12-03 13:58:40
问题 I'm building a site in Rails 3.2. Its been 3 years since I've touched Rails or Ruby, so I'm rusty on both, plus the last time I used rails is was Rails 2.3. Needless to say, please excuse any "simple" questions below. Here are the specs Multi Tennant CMS/Store Site http://company1.mywebsite.com http://company2.mywebsite.com etc. Each "Store" (aka sub-domain) can have its own look, feel, etc. through CSS customizations The customizations can be performed in a UI within the app allowing the

How to enable overflow scrolling within a Semantic Ui Grid?

孤街浪徒 提交于 2019-12-03 13:57:52
I don't have enough rep to post images, but here's a link. http://i.stack.imgur.com/eTp8Q.png I'm having trouble trying to figure out the proper CSS/LESS to enable sidescrolling here within the Semantic UI framework. There are four columns in this part of the grid, and I need to add four more, but have them hidden off to the right until they are scrolled to, if that makes sense. <div class="features ui grid noMargin"> <div class="four wide column greyOdd">Stuff here</div> <div class="four wide column greyEven">More stuff</div> <div class="four wide column greyOdd">Calls n stuff</div> <div

Browsers won't read updated CSS

*爱你&永不变心* 提交于 2019-12-03 13:29:37
问题 EDIT: My sincere apologies! This wasn't an issue with anything but myself - I had a global.css file with correct stuff in it, but below that I included another file with the old CSS in it, in the <head> bit of my HTML. Facepalm. I have a site I'm developing. I'm using LESS to enhance my CSS to make it easier to write. The problem is, when I change the .less file, the styles rendered in the browser refuse to change. I've looked in the generated .css file, and that updates to reflect the

angular root在css和less的写法

坚强是说给别人听的谎言 提交于 2019-12-03 13:26:12
背景:angular7项目,angular cli创建了一个模板 新建了一个common.css 本身modle会有一个专属的less文件 写样式 父组件下的子组件样式修改 在common.css 写样式的时候 需要加 :root xxx(选择器名字){} 在less里面 则不需要写 :root 谁能告诉我为什么呀?为什么呀为什么呀、。、、、、、 来源: https://www.cnblogs.com/qingcui277/p/11796894.html

How to convert Less to Scss?

巧了我就是萌 提交于 2019-12-03 13:12:19
问题 I have to use a converter, but it is very limited. http://hallotheme.com/less2scss Any idea how to convert from LESS to SCSS better? 回答1: The less2sass converter is pretty good and maintained https://www.npmjs.com/package/less2sass Install it (you need https://nodejs.org/en/ on your system) npm install -g less2sass Once installed you can simply run less2sass <path_to_less_file_or_directory> 回答2: this works okayish: https://www.npmjs.com/package/less-scss-convertor npm install -g less-scss

idea配置less自动编译

倖福魔咒の 提交于 2019-12-03 13:12:16
参考: idea配置less自动编译 1. 电脑安装 node.js 环境; window下直接上 官网 下载node.msi文件下载安装即可 安装完成后在命令行执行如下命令表明安装成功 npm -v node -v 2. 全局安装 less npm install -g less 3. 配置 idea 3.1 安装 nodejs 插件 打开 idea → settings → plugins 安装: nodejs 插件,并按以下步骤进行配置: 安装完毕后重启idea 3.2 添加 less 组件 打开 idea → settings → Languages & Frameworks → Node.js and NPM ; 在打开的面板中点击右侧 + 加号按钮添加需要的 less 组件(如果此处不能添加,请使用npm命令进行全局安装)。 3.3 安装 file watchers 插件 打开 idea → settings → plugins 安装: file watchers 插件,并按以下步骤进行设置: 安装完后重启idea 3.4 配置 file watchers 打开 idea → settings → tools → file watchers ; 在打开的面板中点击右侧加号按钮添加less配置,貌似插件自动就配置好了 以上步骤成功后

Lesscss and ASP.NET MVC

大城市里の小女人 提交于 2019-12-03 12:38:15
Since switching my site from ASP.NET WebPages to MVC4, I'm having trouble with Lesscss. CSS + Javascript lines: <link href="@Url.Content("~/Content/site.css")" rel="stylesheet/less" type="text/css" /> <script src="@Url.Content("~/Scripts/less-1.3.0.min.js")" type="text/javascript"></script> I have NO idea what is wrong. The paths are correct. The stylesheet works when you drop the '/less' from the CSS link to use it normally. When trying to use the Lesscss JS file, it loads fine BUT no sylesheet is loaded. F12 dev tools in IE also confirm that the stylesheet is not being loaded. Has anyone

less.js lazy sheet load

血红的双手。 提交于 2019-12-03 12:23:48
问题 I'm wondering if there is a way to load a single less sheet sometime after a page load. This question has an answer that explains how to reload all the sheets, but for my use-case existing sheets never have dependencies on newly loaded sheets, and it would be good to just add the sheet lazily. I'm thinking something like less.sheets.push(mySheet); less.loadStyleSheet(mySheet); might represent a possible API? Cheers, Colin UPDATE 3rd Dec 2010: I've tried out Livingston Samuel's fix of the less

Dynamic class names in LESS

自作多情 提交于 2019-12-03 12:13:11
I have the following bit of LESS code working @iterations: 940; @iterations: 940; @col:2.0833333333333333333333333333333%; // helper class, will never show up in resulting css // will be called as long the index is above 0 .loopingClass (@index) when (@index > -20) { // create the actual css selector, example will result in // .myclass_30, .myclass_28, .... , .myclass_1 (~".gs@{index}") { // your resulting css width: (@index/20+1)*@col; } // next iteration .loopingClass(@index - 60); } // end the loop when index is 0 .loopingClass (-20) {} // "call" the loopingClass the first time with highest

Linux less grep

孤街醉人 提交于 2019-12-03 12:03:17
第一步,less查看文件 less 日志文件名 1,这时候,使用组合键 shift + g 可以定位到文件末尾。 在文件末尾,使用组合键(从末尾开始根据之后输入的字符串向上检索) shift + ? 然后输入查询条件,可以是时间串,也可以是关键字,比如日志有打印userid,则输入有问题的userid,检测所有有该userid出现过的日志。 使用y键即可以向上逐个定位到 2,若没有定位到末尾,则使用组合键(从文件开头向下检索) shift + / 然后一样,输入要查询的字符串。 使用组合键 shift + n 向下查找下一个关键字。 当然直接enter也是可以的。 这样,就很简单地可以根据时间点定位日志。或者是根据需要的查询内容查找是否出错了。 另外一个grep命令,简单说下, 查看日志(查看某字符串出现的地方): grep -i ‘搜索内容‘ ‘日志文件名‘ 面试还遇到过,问查询一个文件某个字符串的出现次数,命令如下,用-c选项: grep -c ‘搜索内容‘ ‘日志文件名‘  Linux查找命令grep和less 用grep 查找文件中出现的关键字 grep -A 40 '扣除用户余额异常' mall-api.out 来源: https://www.cnblogs.com/zery/p/11795391.html