Most voted "less" questions
Use this tag when the question refers to some feature, information or problem relating exclusively to the Less preprocessor. Less is a pre-processor of CSS style sheets, which extends the CSS, adding features that allow variables, mixins, functions and other techniques that allow more sustainable and extensible CSS development.
Learn more…47 questions
Sort by count of
-
25
votes2
answers1645
viewsWhat are the structural and syntax differences between Sass, Less and Stylus?
Nowadays it’s hard to see people writing "old-fashioned CSS" because of pre-processors that make it easy to write by removing code repeats, and syntax simplification. I would like to understand what…
-
16
votes1
answer8375
viewsWhat’s the difference between Less and Sass?
What is the difference of each and advantages and disadvantages?
-
5
votes4
answers1363
viewsHow to change an element within a Less file?
@fundo:#fff; //como alterar isso, externamente com javascript @texto:rgb(94, 135, 176); //preciso mudar essa propriedade dinamicamente. .wrapper{ …
-
5
votes5
answers1089
viewsProblem with <link rel="stylesheet/Less" ... >
I’ll start studying LESS, but the problem is I can’t move on to the first step. If I put the <link rel="stylesheeet/less"...> does not work. Only work if I put the <link…
-
5
votes1
answer422
viewsLess should be compiled yet in development?
My doubt arose after read this question and its answers. Many Ides provide ways to compile LESS code still in development. In Netbeans, for example, it is possible to configure forever the code…
lessasked 10 years ago Renan Gomes 19,011 -
5
votes3
answers96
viewsDoubt how to use a Less class with RAZOR
I’m doing some research to implement a feature to make life easier when it comes to programming. It is possible to do this? We are using VS2013 with Razor. I have the following class Less:…
-
5
votes1
answer577
viewsHow to compile Less or Sass automatically?
Guys, I have a question about Less/Sass. Nowadays I only work with Sublime Text to develop my sites, and I use Sass or Less for the styles and use Koala to compile them. But I wonder if there is any…
-
4
votes1
answer133
viewsHow to livereload using Grunt for . Less files?
A SOLUÇÃO ESTÁ NA TERCEIRA PARTE JUNTO COM OS ARQUIVOS. I can do it for . htlm and . css files but not . Less. Here the full Gruntfile. Below, a snippet of the part I think matters most: watch: {…
-
3
votes1
answer613
viewsIs it possible to extend the bootstrap css using Less?
I use twitter bootstrap for some things, and came across the ease of using Less, as I can, to use the bootstrap Less variables in a second css file? For example, calling media querys with bootstrap…
-
3
votes2
answers3930
viewsFather Height Element and Sons Position Absolute Elements
I have a div - position:relative. And inside that div I have several divs- position:absolute. Thus the height of div parent does not work automatically. I want the height automatically adjust to the…
-
3
votes2
answers129
viewsGulp + Bower - How to import Bower installed components for my final project
I’m starting to manage my components with Bower and I’m having a question: I use Gulp to perform tasks like compiling my Less files, concatenating Avascripts, only how Bower components get inside…
-
3
votes1
answer49
viewsPrepocessor (Less) - Variable @Arguments
Assuming I have the following mixin with following arguments: .font-style(@size: 1.2em, @style: 100, @leading:1.4em, @color: #efefed) Now I want to play this mixin passing the arguments I define to…
-
3
votes2
answers138
viewshow to work with SASS/LESS in real time?
I recently paid attention to pre-processors of css as less and sass because I saw advantages in using them, but I see the need for a workflow so that the css generated is compiled automatically. At…
-
2
votes1
answer68
viewsParse error on Less, says my class/mixin is not defined
I’m using ruby 1.9.2 and Rails 3 and Gem Less 2.6.0. I’ve already imported ruby mixins and the variables and yet the error persists. Less::Parseerror: #gradient > . vertical is Undefined Excerpt…
-
2
votes1
answer65
viewsSASS SCSS - Problems with rounding.
I have the following problem: developing a Grid system with SCSS, I got the problem of rounding the percentages that define the size of each column. I was wondering if anyone has a solution for…
-
2
votes2
answers327
viewsElement:First-Child Does Not Work
In this example below there is an element .title. And in it I’m putting one first-child with margin-top:20px;. When compiling and saving is not working. Do not apply the top margin on the first…
-
2
votes0
answers375
viewsHow do bar get responsive?
I’m trying to make this HTML5 video player icons responsive. <div id="video-controls"> <div class="play-video"> {!! Html::image('img/video/play.png', 'Play / Pause Video', ['class' =>…
-
2
votes2
answers81
viewsHow to use the LESS "when" operator?
I quickly searched the site of Less to see how it is used, but I was not successful, so I wanted to know how the operator works when less!? Examples: box-shadow(@style, @c) when (iscolor(@c)) {…
-
2
votes1
answer44
viewsCalling a variable from other variables in LESS
How can I call a variable from other variables as in other languages in Less? PHP: $name = 'stack'; $level = '900'; $nameVariable = $name . $level; ${$nameVariable}; // chama variável: $stack900…
-
2
votes3
answers636
viewsLess is a programming language, or just something more complex than CSS?
Well I believe that Less may not be a programming language, so what is it? where does it rank? If it really is a programming language what makes it?
-
2
votes1
answer653
viewsWhat are the advantages and disadvantages of using css preprocessors?
I’ve always heard developers talk about pre-processors, but I haven’t found articles on disadvantages and advantages yet. I also wondered if it’s better to use pure or pre-processed css.…
-
2
votes0
answers13
viewsAdd a Parent '&' to a variable using LESS
I have a problem but I do not know if it is possible, I’m wanting to edit some class putting a & follow the example: .bcolor(@prefix, @suffix) { .@{prefix}red@{suffix} { background-color: red; }…
lessasked 8 years, 4 months ago iLeonardo Carvalho 561 -
1
votes1
answer201
viewsHow do I use a mixin created in another file?
I have a question about using mixin Less on different style sheets. I have 2 sheets of initial styles: reset.Less and styleguide.Less I wonder how I can in styleguide.Less define a mixin title. And…
-
1
votes1
answer52
viewsHow to use the Calc() attribute in the LESS Preprocessor
When using the attribute Calc() in LESS I came across the following problem: When compiling the code height: -webkit-calc(100vh - 6em); the output resulted in the calculation of 100 - 6 and adds the…
-
1
votes1
answer35
viewsHow can I use a Less variable to give the source address?
In my file Less I have a variable called @address with the main address where the fonts are, I have several fonts and need to put the directory in all with this variable, but it does not work. One…
-
1
votes1
answer32
viewsCalculations with Less css
I have the following mixin: .mixin-loop (@i) when (@i > 0) { .navigation .dropdown > li:nth-child(@{i}) { .vendor(animation, new-menu 200ms ease-in-out forwards); } } This . vendor being only…
-
1
votes1
answer39
viewsCalculate using Math operations on LESS
I’m trying to add one number with a string and LESS is not interpreting as I wanted, see the example: @screen-sm: 768; @screen-md: 1024; .col-tablet(@rules) { @media (min-width: @screen-sm+'px') and…
lessasked 7 years, 4 months ago iLeonardo Carvalho 561 -
1
votes1
answer70
viewsMixin in LESS for the CSS "Calc()" function, how to use two variables?
I have this mixin that works perfectly: .calcW(@valor2: 100px) { width: -o-calc(~"100% - "@valor2); width: -webkit-calc(~"100% - "@valor2); width: -moz-calc(~"100% - "@valor2); width: calc(~"100% -…
lessasked 8 years, 1 month ago Guilherme Laureano 501 -
1
votes1
answer409
viewsProblem when changing menu colors with bootstrap-Less 3.3.7
Guys I’m making a website with HTML5 and bootstrap-lesseverything works normally but needed to change some colors in the menu navbar and I know that I can do this through variables.less inside that…
-
1
votes1
answer40
viewsHow to make an automatic grid for exact measurements using SCSS?
I have the following example but in percentage: $grid__cols: 12; @for $i from 1 through $grid__cols { .col-#{$i} { flex-basis: (100 / ($grid__cols / $i) ) * 1%; } } That may be tested here, to…
-
1
votes2
answers185
viewsProblems with positioning with columns in Bootstrap 3
I’m having a positioning problem with the bootstrap grids I’m making a virtual store where the layout has to look like this: But with my coding he got like this: Notice that in this image the wines…
-
1
votes1
answer80
viewsProblem in the Hover effect with Less
I’m trying to make an effect of hover to add a background-color in my image but does not work it creates the background-color Behind the picture I needed her to stay in front I’m using less to do…
-
1
votes0
answers44
views -
1
votes2
answers61
viewsI cannot remove default background
Next guys, I’m using a wordpress plugin to organize the menu dishes of the restaurant, this: (food-and-drink-menu - url: https://br.wordpress.org/plugins/food-and-drink-menu/) All right, let’s go!…
-
0
votes2
answers366
viewsHow to Overwrite an Image with DIV
Gentlemen, I’m pulling some images from the database, and when the user hovers over them an opaque red color will be above them, and a title and text will be shown. I did this by putting the image…
-
0
votes2
answers57
viewsUse @import in Less by passing variable as parameter
I’m making a mixin in Less and need to use @import passing a variable as parameter. Example: change-Theme.Less .change-theme(@theme) { @import @theme; // Another code goes here } Theme.Less @import…
-
0
votes1
answer80
viewsAnimation with Problem in Safari
A while ago I realized that in Safari animations work in a different way. For example, if we have a text inside a span and we want the hover the letters of this text diminish 1px, we put…
-
0
votes1
answer75
viewsProblems with grid in Bootstrap version 3
I’m having grid problems in my html with bootstrap it should look like this but in my browser it looks like this: notice that on my banner that is inside the tag <header> this one with…
-
0
votes2
answers346
viewsMain differences between structuring CSS with PHP and LESS/SASS
In many projects I’ve been writing CSS with PHP, what is a practice well unknown but that meets all the needs of dynamization, example... CSS <?php header("Content-type: text/css"); $cor_fundo =…
-
0
votes2
answers295
viewsProblem with Bootstrap Resizing
I’m having the following problem I’m ultilizing bootstrap in version 3 need my page to look like this template: but when I redeem my images they look like this: I would like the black image to be…
-
0
votes1
answer33
viewsGet USER AGENT and modify
I’m trying to set up a PHP function to check the USER AGENT I should be able to know if you are on a mobile or desktop After this based on this information I will apply a different style to the page…
-
0
votes0
answers65
viewsSite does not display CSS after Publication
After publishing my site, css does not load across the entire page, getting only in HTML. I am using Bootsrap Less. My structure: Bundle: using System.Web; using System.Web.Optimization; namespace…
-
0
votes1
answer994
viewsChange content by hovering over a div
People need to make sure that when you mouse(Hover) in a div she changes the contents of the side the image explains well how the process should be done when hovering over the div should exchange…
-
0
votes1
answer47
viewsProblem to convert SCSS to LESS
I am using a background made with svg from this link here but his color palette is SCSS and I’m using the LESS how can I convert these elements to LESS? I tried to put the @ in place of $ but it…
-
0
votes1
answer327
viewsCSS: Pass values/parameters through class names
I would like to know if there is the possibility of informing values through class names to be used as values in the properties of the same. Example: .text-(color) { color: (color); } The result…
-
-1
votes1
answer24
viewsUnable to load plugin watch (Less)
I’m trying to install Less on my windows, when I give a lessc --watch agency.less custom.css Appears: Unable to load plugin watch Please make sure that it is installed under or at the same level as…
-
-1
votes1
answer237
viewsWhy don’t Sass and Less work on Powershell?
I installed Sass and Less through Node.js (globally, as exemplified on the websites of the tools in question). I used both in cmd without problems, but when trying in Powershell, I received the…