Questions tagged [lessphp]

a compiler that generates CSS; designed to be compatible with less.js.

lessphp is a compiler written in similar to

It is designed to be compatible with the JavaScript version of the LESS compiler, and suitable as a drop-in replacement.

Plugins exist to integrate lessphp into popular content management systems and frameworks such as Symfony, WordPress, Drupal, CakePHP, and Magento.

lessphp is compatible with PHP 5.1+.

52 questions
1
vote
0 answers

How to Output Wordpress Theme Customizer changes into .less file?

I'm trying to build a wordpress theme with bootstrap 3 less. I managed to setup wordpress customizer options for color changing to work by outputting css into theme header, the classic way, but I was wondering if there is a way to output these…
Goran Tesic
  • 719
  • 1
  • 13
  • 28
1
vote
1 answer

Symfony - Assetic sometimes don't apply filters to named assets created form bundle

In my project I use code below to add to assetic some named assets and one of them use lessphp filter. public function prepend(ContainerBuilder $container) { $configs = $container->getExtensionConfig($this->getAlias()); $config =…
user1952959
1
vote
1 answer

Symfony2 LessPHP works fine in dev environment but not in prod

I have a website under Symfony2 using LessPHP. In dev environment everything works fine. When I hit http://mylocalsite/app_dev.php/ the browser reaches http://mylocalsite/app_dev.php/css/XXXX_myFile_1.css. But when I hit http://mylocalsite/ the…
moins52
  • 744
  • 8
  • 27
1
vote
1 answer

Can't parse mediaqueries with Less PHP

In my Less file I've included some variables that I want to use for mediaqueries in Less: @mobile: ~"only screen and (max-width: 529px)"; @tablet: ~"only screen and (min-width: 530px) and (max-width: 949px)"; @desktop: ~"only screen…
1
vote
1 answer

lessphp import path issue, if I use manual import path

I am working on lessphp compiler for my own development needs, here is what I am trying to achieve. a) I have parent theme and child theme both have less files. b) Using twitter bootstrap less files c) Parent theme have twitter bootstrap less…
Syed
  • 148
  • 1
  • 16
1
vote
1 answer

compile LESS with custom parameters using Assetic

I want to compile a LESS file with parameters fetched from the database. So something like this: $color = "#433332"; And then in .less @baseColor: $color; Of course this is just pseudocode, so give you an idea what I want to do. I am using…
Johannes Klauß
  • 10,676
  • 16
  • 68
  • 122
0
votes
1 answer

getting error "lessphp fatal error: failed to parse passed in variable @heading_font_weight:"

My wordpress site is showing error- "lessphp fatal error: failed to parse passed in variable @heading_font_weight:" Please help.
0
votes
1 answer

WP LESSPHP -> Fatal error: Uncaught exception 'Exception' with message 'load error:

I loaded lessphp in my wordpress theme - it's a full custom - but I do not understand why it can not correctly link the .less file. to be clearer the current paths are…
Alberto
  • 274
  • 1
  • 5
  • 16
0
votes
1 answer

Shopware - disable PHP less compiler?

Shopware version 5.2.x I use gulp and its browsersync plugin to compile my less files for quicker development. I have a strange problem - some entries of SVGs defined in the less file are compiled with gulp-less seamlessly, but when I reload the…
zarun
  • 910
  • 9
  • 26
0
votes
2 answers

lessphp load error with file LESS

I'm new with the lessphp library, I'm using Joomla and I'm working with a template, I'd like to compile a less file with a php file, this is way I'm using phpless, to compile my LESS file I'm using this code: require "lessc.inc.php"; $less = new…
valentina.a87
  • 117
  • 1
  • 3
  • 15
0
votes
0 answers

LESS: Using CSS colors as variable names when looping through array

The following code generates color classes. However, if I want a class like .c-black or .c-white where "black" and "white" are already defined CSS colors, LESS outputs: .c-#000000 or .c-#ffffff instead. I'd prefer not to have to put quotes around…
HandiworkNYC.com
  • 10,914
  • 25
  • 92
  • 154
0
votes
1 answer

Lessphp contrast function's output doesn't match with the documentation

I've been using the contrast function for the first time and think it's buggy. On this page, I find the following explanation: contrast(@color1, @darkcolor, @lightcolor); // outputs @darkcolor, when @color1 have more than 43% Luma // if not…
Shimakuro
  • 314
  • 1
  • 2
  • 10
0
votes
2 answers

Put a div over a tag a inside li

I have the following html code: And the following CSS: ul.ul { background-image: url(text.png); …
OSOMAN
  • 47
  • 1
  • 7
0
votes
0 answers

Error when assetic with lessphp try to compile a LESS file

I want to switch my project on assetic with symfony2 but when lessphp try to compile my LESS file, I have the following error: [error] expecting number: line:21 My investigation leads me to this line: .note-gradient-variation(@note-names;…
Xaat
  • 1
  • 2
0
votes
1 answer

Call mixin if variable is defined

I try to use mixin guards with when condition, but during compiling I get the following error: .mixin is undefined .mixin (@color) when (isstring(@color)) { //some code } .mixin(#008000); When I remove the when condition it works. Whats the…
user3314010
  • 41
  • 1
  • 4