less

Subprocess very slow when calling external egrep and less

左心房为你撑大大i 提交于 2019-12-13 06:08:15
问题 I'm trying to build a python script that will allow me dynamic build up on egrep -v attributes and pipe the output into less (or more). The reason why I want to use external egrep+less is because files that I am processing are very large text files (500MB+). Reading them first into a list and processing all natively through Python is very slow. However, when I use os.system or subprocess.call, everything is very slow at the moment I want to exit less output and return back to python code. My

SquishIt.Less ProcessIncludes() not working for CSS file

限于喜欢 提交于 2019-12-13 05:35:00
问题 I have a Less file which includes a CSS file, then a set of Less files. With SquishIt I want to combine and minify these, but it ignores the CSS file unless I rename it to .css.less. I believe ProcessIncludes() is intended for this purpose but makes no difference. Does anyone know why ProcessIncludes() doesn't do anything on a CSS file linked in a Less file? (This is a follow up to: this question about Squishit.Less not working at all, it now works for the Less files.) 回答1: There is a

Rotatable Multi-stop SVG linear gradient mixin

旧巷老猫 提交于 2019-12-13 05:15:57
问题 I have created a multi-stop SVG linear gradient mixin but I am having trouble getting the SVG to scale when rotating to mimic the css3 linears-gradient spec. It works perfectly for horizontal and vertical gradients. At 45, 135, 225 and 315 degrees it also works perfectly but only if the ratio of the object is 1:1. Otherwise, it's just not quite right! I tried playing with preserveAspectRatio="xMaxYMax meet" etc. and tried to get things working with background-size:cover or contain, but

Why does this CSS work on Codepen but not directly in browser?

て烟熏妆下的殇ゞ 提交于 2019-12-13 05:09:38
问题 I'm trying to implement a CSS-only modal box with animation onto my website. It works perfectly on this Codepen I found: http://codepen.io/petebot/pen/DBvKj But I can't test or customize this code on my website because it doesn't work on an HTML page. What am I missing here? Here's the HTML page: <html> <head> <title></title> <style> @import url(http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); .transition (@time: .5s, @range: all, @ease: ease-out) { -moz-transition: @range @time

Less inherit “virtual” class

扶醉桌前 提交于 2019-12-13 05:08:34
问题 I am using SASS and there is nice feature: I can create "fake/virtual" class and then use it for extend. Example: %myFakeClass { color:#fff; background-color:#000; } .myRealClass { @extend %myFakeClass; } .myRealClass2 { @extend %myFakeClass; } Output: .myRealClass, .myRealClass2 { color:#fff; background-color:#000; } The question: Does LESS has something similar? In other words, I want to create a "virtual class" that I can inherit from, but the "virtual class" itself not exists in output.

LESS: Generate dark or light variation of a color set based upon a parameter

亡梦爱人 提交于 2019-12-13 04:52:12
问题 Some days ago I made a similar question in order to generate LESS variables with a LOOP . Today I start from the same topic with a similar topic. I have the following colorizer theme: // Colors @color-gray: rgb(225,225,225); @color-black: rgb(15,15,15); @color-blue: rgb(37,117,237); @color-red: rgb(222,44,59); @color-yellow: rgb(255,200,0); @color-green: rgb(44,159,66); @color-white: rgb(255,255,255); // Colors Dark @color-gray-dark: rgb(179,182,183); @color-black-dark: rgb(0,0,0); @color

How to set container width to 980px in bootstrap 3.0.2?

十年热恋 提交于 2019-12-13 04:50:07
问题 In bootstrap 3.0 I can wrap .container class with my class and set the width to my class to 980px EX <div class="maincontainer"> <div class="container"> //some content </div> </div> CSS .maincontainer { max-width: 980px; margin:0 auto; } That code will wrap my contents with 980px , but in bootstrap 3.0.2 the author has change class .container to width not max-width in bootstrap 3.0. So it is hard to set 980px for my layout!! I'm using LESS css! Any ideas? 回答1: A few of choices In bootstrap,

Less CSS - class declaration in html?

不羁岁月 提交于 2019-12-13 04:39:52
问题 I get where less could be used, but doing this (which doesn't work): <div class="fixed-width(150px)" ></div> .fixed-width(@customWidth) { width: @customWidth; } ...seems like it makes more sense than the offered example of: <div class="fixed-width" ></div> .fixed-width { .another-step(150px); } .another-step(@customWidth) { width: @customWidth; } Is there an easy way to accomplish this I'm missing? 回答1: No. LESS compiles the CSS file only, not the inline CSS as well. You'd have to write an

Use border-width like parameter in LESS

烂漫一生 提交于 2019-12-13 04:29:33
问题 I'm still discovering the utility of this technology. Please I have a question if someone can answer me. I'm trying to create a function like: .advancedBorder( @color, @size ) { border: @size solid @color; } div { .advancedBorder( #FFF, 1px 0px 1px 0px); } So, I tried in many ways to make it possible but without any success. The real reason is to create a function that can be added to any box and setting for it any border size and color I prefer with minimum lines of code. Can someone show me

Howto remove a entry from the tree in a Less visitor plugin

╄→尐↘猪︶ㄣ 提交于 2019-12-13 03:59:50
问题 I tried the following: module.exports = function(less) { function RemoveProperty() { this._visitor = new less.visitors.Visitor(this); }; RemoveProperty.prototype = { isReplacing: true, isPreEvalVisitor: true, run: function (root) { return this._visitor.visit(root); }, visitRule: function (ruleNode, visitArgs) { if(ruleNode.name[0].value != '-some-aribitrary-property') { return ruleNode; } else { return new less.tree.Rule([], [], 0,""); } } }; return RemoveProperty; }; return new less.tree