Comments (5)
I've added test for this issue, and it passes.
Can you pls provide a failing test case?
from iless.
I have a pretty complicated integration, but the only difference I can see for the failed import (no error, just doesn't pick up the swatch styles) is that I set the variable (to compile bootstrap3) via $compiler->setVariables()...it appears my other compilations event with the 1st example above are not correctly importing the 'swatch'. A similar compilation I use in a 'wrapped' bootstrap3 with the 'swatch' variable set in the wrapper .less file (as your test does) works (see below).
.exp-skin {
@swatch: "cerulean"; // newui uses this swatch
@themepath: "cerulean"; // hack to prevent crash
@import "bootstrap.less";
}
from iless.
Can you please provide minimal failing test case for this? I'm not able to reproduce this.
from iless.
A better test (#50) would be
$parser->setVariables(array('swatch'=>'foobar'));
$parser->parseString('@import "../../../bootstrap3/less/@{swatch}/variables.less";');
instead of
$parser->parseString('@swatch: foobar;@import "../../../bootstrap3/less/@{swatch}/variables.less";')
which fails for me, and accurately reflects what my code is doing
from iless.
It looks as if the variables are only passed to the rule parser if they are a part of the string/file (ruleset) being passed and NOT any variables (customVariables?) set by method call. Maybe around the ILess_Parser_Core->to CSS() method during the precompilation visitors call.
from iless.
Related Issues (20)
- clean() dangerous
- Is there any test for 'no changes' to compilation? HOT 2
- Notice: Undefined property: ILess_Node_Quoted::$operator in ILess/Visitor/ProcessExtend.php on line 356
- setVariables doesn't handle rgba values right
- Issue #50 has resurfaced - Doesn't properly parse variables within an @import HOT 1
- tests bootstrap.php doesn't work as written HOT 1
- Errors prevent compilation of Twitter Bootstrap v3 w/ some Bootswatches
- Parser->toCSS() crashes on empty variable? HOT 3
- Cache does not work with source map output
- Allow parser setup from command line
- Cli utility does not exit with non zero error code
- Cache does not work under HHVM HOT 1
- parser fails with error code for long data uri HOT 1
- Import reference fails under php 7
- iless Strict Math option defult is different from less HOT 3
- detached rulesets aren't imported when using reference option HOT 1
- Simple CSS3 calc(100% - 10px) fails HOT 5
- How to prevent 0.5 from being changed to .5
- The long version of the strict-units option does not do anything.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iless.