Questions tagged [lesscss-resources]

18 questions
16
votes
3 answers

Compile LESS files with source maps

How can I compile a LESS file to output a source map file (.css.map) in addition to a CSS file? Is there a way to do it on both command line (NodeJS's lessc) and on any GUI-based programs?
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
3
votes
0 answers

Prevent variable color name to be converted into hex in less class names

I want to use a variable that will contain the name of a color (red, blue, green, etc) and to define some class style rules. For example: .mixins-common-components(@colorName, @backgroundColor, @textColor){ .btn{ &.@{colorName}{ …
Edd
  • 31
  • 2
3
votes
1 answer

override less variable property/value with inline variable in jsp/html

I have a situation where I have to override the less variable property/value with inline variable written in jsp/html. I define few variable in main file (abc.less) as follows: @bodyColor: rgb(88,90,91); // (#585a5b) grayish @brandColor1:…
3
votes
2 answers

grails generate css/js resources

I am using coffeescript-resources and the lesscss-resources plugins, how can I generate the resources to get the raw js/css ? I know I can package it then explode the war, but is there a way to get the outputs in a simpler way?
Nix
  • 57,072
  • 29
  • 149
  • 198
1
vote
1 answer

How can I possibly make this LESSCSS loop work correctly?

In my project I use 4 color themes and with this function I want to automatically assign the specific colors values contained in the variable and I want also to use the name of the variable to assign it to the class. // the variables @peach:…
nedzen
  • 13
  • 3
0
votes
1 answer

SCSS Passing numeric value in Interpolation

this is not working, Help needed, am I missing some thing?? I am trying to achieve Variable numeric value for @for $i ..... through .... {... , passing from mixin $colors: ('primary': #000, 'secondary': #fff); @mixin titleTxt($title, $start, $end)…
0
votes
1 answer

How to Split up sass file

Lets say for example that I have HTML file with , and , how can I split up my css file into multiple files with each file containing styling for each of the tags. In other words, can I have header.scss, main.scss and footer.scss files all…
0
votes
1 answer

LESS CSS - Not reinventing the wheel

By “wheel” I mean the nested selector path. I’ve converted a somewhat large CSS file to LESS for the most part, nesting rules in DOM order. However, some of my styles are being overridden. Basically, all of the “plain” styles have been nested making…
0
votes
0 answers

how to truncate table cell data into three rows using css

The table cell data is truncating only in one line, I need to truncate table cell data into three line.enter link description here here I wat to show text like to truncate into third line using css
chen le
  • 41
  • 6
0
votes
1 answer

Compiling .less files with lessc

I'm trying to compile 2 less files using lessc for nodejs. my files are organized in this order: lessc file is in C:\test\less\bin, test.less and all.less files are in C:\test\css my lessc command line is: lessc --include-path="..\..\test"…
Amit Ben Ami
  • 548
  • 2
  • 6
  • 21
0
votes
1 answer

Nesting multiple same type class inside one parent

I want to create classes like below: .colored{ &{ .red{background-color:red;} .blue{background-color:blue;} .gray{background-color:gray;} } } and it is not working but if I write like this: .colored{ …
maviofis
  • 45
  • 2
  • 6
0
votes
0 answers

How to set a var with dynamic name in less mixin

I am trying to create a mixin that will set a var with a dynamic name. // less File B .varMaker(@varname, @value){ // Here I would like to set a var with the name @varname } // less File A .varMaker(foo,bar); My mixin is defined in a file B…
Ousmane
  • 2,673
  • 3
  • 30
  • 37
0
votes
3 answers

Mixing in Less CSS

I'm still new at using Less CSS and I couldn't find a solution to my problem. I want a more efficient output result. I have this code in less : .btn-trans { color: inherit; background-color: transparent; transition: all .4s; …
LuTz
  • 1,493
  • 1
  • 15
  • 25
0
votes
1 answer

How can I split a string in LESS?

In Stylus it's as easy as split('1/2', '/')[0] (which will split a string value at a certain delimiter, in the example it would return 1), in Sass I needed a huge function to do it. I don't see a way to natively do this in LESS or a function for…
corysimmons
  • 7,296
  • 4
  • 57
  • 65
0
votes
1 answer

Mixin scenario, trying to converting css

I've got a problem when i am converting CSS to LESS CSS in the below Scenario. In the below CSS i have same properties for :hover and .active classes. CSS: .sideNav ul li:hover, .sideNav ul li.active {background-color:#fff;border:1px solid…
Pavan Kumar
  • 1,616
  • 5
  • 26
  • 38
1
2