less

Less css compiler. Unable to use darken property

一曲冷凌霜 提交于 2019-12-02 15:05:02
问题 I'm developing a project using LESS as compiler for my CSS. I have already a fully working loop that sets the background color properly. My question is this: With my current code, when i try to use darken property, the compiling result is this: SyntaxError:error evaluating function darken : Object # has no method 'toHSL' and the code is this one: @colors: "008B8B", "00CDCD", "00EEEE"; /* Colors and background loop (based on colors.less arrays) */ .loop-colors(@index) when (@index > 0){ //

Correct way to create rounded corners in Twitter Bootstrap

梦想的初衷 提交于 2019-12-02 15:01:10
I've just started with Twitter Bootstrap and here is one question. I am creating custom <header> block, and I want it's bottom corners to be rounded. Is there any "correct" way to do this by using predefined classes, or I have to specify it manually like: border-radius: 10px; // and all that cross-browser trumpery For now, I'm using css styles. Maybe it will be better to use less for that issue? Danil Speransky I guess it is what you are looking for: http://blogsh.de/tag/bootstrap-less/ @import 'bootstrap.less'; div.my-class { .border-radius( 5px ); } You can use it because there is a mixin:

Modify alpha opacity of LESS variable

本小妞迷上赌 提交于 2019-12-02 14:59:06
Using LESS, I know that I can change the saturation or tint of a color variable. That looks like this: background: lighten(@blue, 20%); I want to change the alpha opacity of my color, though. Preferably like this: background: alpha(@blue, 20%); Is there a simple way to do this in LESS? The site documentation gives the answer: background: fade(@blue, 20%); The function name is fade not alpha according to that document. For completeness fade Set the absolute transparency of a color. Can be applied to colors whether they already have an opacity value or not. background: fade(@blue, 20%); fadein

Bootstrap Icons not showing in published ASP.NET MVC application

回眸只為那壹抹淺笑 提交于 2019-12-02 14:54:07
--- NB: Go to the EDITED 2 section for summary ---- I have an ASP.NT MVC (4) application. I integrated (twitter)Bootstrap to it. Bootstrap is working perfectly, but the icons does not show correctly when I publish the application. I tried to republish the application without success. For clarify I put some images here below. When I run my application from VS2013 the result is this (which is OK): In booth, IE and Chrome. But when I run the published application the result is this (which is NOT ok): Chrome IE (10) This problem has, somehow, to be with the evaluated CSS but I don't know at which

LESS: generate different CSSs for different theme (color variation)

爷,独闯天下 提交于 2019-12-02 14:19:48
问题 I would like to manage creation of different "theme" for my site, using LESS. My idea is to generate different compiled .css files, using each time a specific variable.less that is imported by root file. Here a simple example: 1) I have 2 different color scheme in 2 distinct files: variable1.less and variable2.less . 2) A file style.les s should have an @import rule like " @import variableX.less " and obviously this 'X' should change assuming values '1' and '2' . 3) Compiler should then

Converting a SASS If/Else block to its equivalent in Less

北慕城南 提交于 2019-12-02 13:21:53
问题 There is a little SASS to LESS convergence here... Does anyone know what is the correct syntax for these? The code below is the pure SASS mixins I used to use. Thanks for helping @mixin linear-gradient($left, $right, $optional:false) { @if $optional and type_of($optional) == number { background: -webkit-linear-gradient($optional + deg, $left, $right); background: -o-linear-gradient($optional + deg, $left, $right); background: -moz-linear-gradient($optional + deg, $left, $right); background:

Using material ui createStyles

限于喜欢 提交于 2019-12-02 11:40:22
问题 I'm trying to transform my css from a less file to material createStyles and i can't get my head around how it works. I understand the basics of the createstyles but i can't my child selector working All i want is to be able to access the css class missionStatusLibelle .missionStatus { display: flex; align-items: center; height: 34px; width: 100%; .missionStatusLibelle { align-items: flex-start; justify-content: flex-start; margin-left: 10px; font-size: 14px; font-weight: 500; line-height:

Rem fallback for ie7-8

蓝咒 提交于 2019-12-02 11:31:21
问题 I'm using the "rem" unit for all my "modern" websites, to make this compatible with ie7-8 I'm using a less function ".font-size(10);" that outputs "font-size:10px; font-size:1rem;" As I am using rem for practical everything (width, top, letter-spacing,...) my css would be much leaner without the pixel fallback. How difficult would it be making a .htc file that automatically formats rem into px? Are there other ways without js? 回答1: If you need to support IE7/8, just stick with the LESS

Unable to unbind a shell function

…衆ロ難τιáo~ 提交于 2019-12-02 11:05:56
This question is based on the thread . I have the shell function function man() { man "$1" > /tmp/manual; less /tmp/manual } The problem is there exists the command man. How can you replace the command with my command? Ryan Oberoi Replace man "$1" with the pathname: /usr/bin/man. Or change it to use 'which man' within backquotes. Then run your script in the current shell. On bash/ksh you need to save your script in some file, say man.sh and then run it as '. ./man.sh'. cat > man.sh function man() { /usr/bin/man "$1" > /tmp/manual; less /tmp/manual } ^D . ./man.sh You get the idea. You can