less

LESS: concatenate multiple background rules

跟風遠走 提交于 2019-12-06 16:16:15
I have a mixin that creates a gradient with vendors' prefixes, and I would like to add this background to a DIV in addition to another background-image . .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { background:@start-color; background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); background-image+: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); background-repeat: repeat-x;

Development Workflow - Bootstrap (Less), Bower and Grunt

我是研究僧i 提交于 2019-12-06 15:07:05
I am trying to step up my game as far as my folder structure and workflow is considered. I have recently discovered that front end package management and automation of tasks are key to improve speed, decreasing dev time, decrease file size and increase profit. My issue is I am not too sure what the best method of using these tools are. I have a builds folder, which includes a dev and prod folder. My components are outside this folder in the bower_components folder. I usually customise bootstrap and take advantage of it's variables file and mixins. I have copied the bootstrap.less file, and the

Using and routing Less file in the layout.cshtml in ASP.NET Core 2

余生长醉 提交于 2019-12-06 15:05:49
问题 I've used a template for admin section (bootstrap admin template) in my project and installed it from Bower and I've applied ASP.NET Core 2 . When I run the project, I get an error that is: FileError: 'http://localhost:52125/lib/bootstrap-admin-template/public/assets/less/theme.less' wasn't found (404) in theme.less But the file, theme.less , exists in the path!! I don't know why browsers cannot recognize the file. For routing the theme.less file I did: <link rel="stylesheet/less" type="text

Integrate LESS version of Bootstrap-Material-Design to Rails Project

时光怂恿深爱的人放手 提交于 2019-12-06 15:04:33
问题 I am using this gem bootstrap-material-design which is a sass version of https://github.com/FezVrasta/bootstrap-material-design library but recently I have noticed that sass version is no longer maintained. Problem i am facing with this gem is that it doesn't turn buttons and flash messages to material styled. One solution as suggested here: https://github.com/FezVrasta/bootstrap-material-design/issues/535 is to use LESS version but I dont know how to Integrate the LESS version of this

Split CSS circle into 3 equal parts with linear gradients - pie chart style

余生长醉 提交于 2019-12-06 13:29:32
I'm trying to create a progress indicator - and to a certain extent I've done it, but it's not what I want to end up with. Here's an image: As you can see the indicator shows 1 third, 2 thirds, then full. This is what I want to achieve except that I want the first, second and third sections to be different colors, so I would end up with 3 equal slices in 3 different colors starting at 12 o'clock. Here's the code - I've removed the centre section because it's not relevant to the question: ( the CSS is in Less syntax ) .timeline { h3 { position:relative; & > .step { background-color:@accentColor

Generating selector lists in LESS

无人久伴 提交于 2019-12-06 12:36:35
Live demo here: http://codepen.io/KenPowers/pen/Ddfqh Consider the following LESS code: // Hide all list items by default and make internal labels have pointer cursors li { display: none; label { cursor: pointer; } } // This function generates selectors and corresponding css .gen (@tag) { @sel: ~"#@{tag}:checked"; @{sel} { & ~ ul > li[data-index~=@{tag}] { display: list-item; } & ~ ul > li > label[for=@{tag}] { color: red; } } } // Generate required selectors and css .gen("foo"); .gen("bar"); .gen("baz"); It generates the following CSS: li { display: none; } li label { cursor: pointer; } #foo

Use less to generate dynamic CSS rules based on parameter value and passed mixin

偶尔善良 提交于 2019-12-06 12:27:34
问题 It is possible to achieve something like this in LESS? .some-button(@className) { @className { .actionIcon; } tr:hover { @className { .actionButton; } } } When I call it: .some-button(.edit-action); The expected output should be : .edit-action { .actionIcon; } tr:hover { .edit-action { .actionButton; } } Currently I'm getting this "Unrecognized input in @className { .actionIcon; }" error: .some-button(@className) { @className { .actionIcon; } tr:hover { EDIT Another thing I would like to

How to use stylus block level import with Vuetify styles

柔情痞子 提交于 2019-12-06 11:36:30
问题 Using a stylus block level import: # vuetify-style.styl .myapp @import '~vuetify/src/stylus/main' This is to ensure that the vuetify css doesn't interfere with elements from other parts of the page which aren't using vuetify. But unfortunately it doesn't work, I can't compile it. ERROR Failed to compile with 1 errors 2:13:28 pm error in ./src/stylus/main.styl Module build failed (from ./node_modules/stylus-loader/index.js): Error: node_modules/vuetify/src/stylus/settings/_el evations.styl:85

Django + Mac osx how to use less css?

这一生的挚爱 提交于 2019-12-06 11:35:59
There is no less css command line compiler in mac osx. But I am trying out a project which needs to use less css. Also less is used to compress the css files in the project. How do I handle this? I read in less website that its js can be run on a node.js server - http://lesscss.org/#-server-side-usage But I am not understanding how to integrate it with django. What should be the value for the COMPRESS_PRECOMPILERS ? COMPRESS_PRECOMPILERS = ( ('text/less',""), ) Any help appreciated from someone who has already solved this problem. Install node.js and npm (I used homebrew to install node.js and

Gulp: how to get gulp result as variable

谁都会走 提交于 2019-12-06 11:24:46
Needed something like this: gulp.src(path.join(conf.paths.src, '/**/*.less')) .pipe($.less()) // already have some result, but HUGE changes are needed .pipe(HERE_I_GET_IT_AS_A_TEXT(function(str){ // a lot of different changes return changed_str; })) .pipe(rename('styles.css')) // go on doing smth with changed_str .pipe(gulp.dest('./app/theme/')); Is there something in gulp to get some transitional result as text, process text with js and pass it to the next pipes? Everywhere I find only solution with reading files directly, this way is pointless for me. Use map-stream : var gulp = require(