Giter Site home page Giter Site logo

Comments (5)

mishal avatar mishal commented on June 11, 2024

I've added test for this issue, and it passes.

Can you pls provide a failing test case?

from iless.

dleffler avatar dleffler commented on June 11, 2024

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.

mishal avatar mishal commented on June 11, 2024

Can you please provide minimal failing test case for this? I'm not able to reproduce this.

from iless.

dleffler avatar dleffler commented on June 11, 2024

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.

dleffler avatar dleffler commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.