agar / less.php Goto Github PK
View Code? Open in Web Editor NEWless.js ported to PHP.
less.js ported to PHP.
test.less
@myVar: 10px;
Attempt to compile:
bin/lessc test.less test.css
Output:
PHP Notice: Uninitialized string offset: 15 in .../less.php/lib/Less/Parser.php on line 1045
Adding a new line or ending the file with a }
appears to solve the problem, for now.
Hey Matt,
It seems that the compiler fails to compile the newest version of Bootstrap (1.4.0). It seems that the compilation fails on the reset.less file and I traced the issue down to the second line in the following comment block:
/* Reset.less
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
* ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
I have no idea why this happens but everything works fine when I remove second line, which is extremely wierd.
Hello,
when a long css comment /* ... */ is being parsed, the match() method will fail and the http connection will also fail with status "Aborted". It is invoked in Parser::parseComment().
The right regexp for parsing css comments in php is eg.: #/*._?_/#Us
The following rule is not being correctly parsed:
content: '\2014 \00A0';
Looks like an issue with mixin calls adding rules to incorrect places.
Hex values are being rounded at some point to produce slightly different values than those done by less.js.
For example, twitter bootstrap in less.js generates:
.label.notice {
background-color: #62cffc;
}
where as less.php generates
.label.notice {
background-color: #62d1fc;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.