-
Notifications
You must be signed in to change notification settings - Fork 2
Using variables in @imported file #352
Comments
I tested your issue again my fork https://github.com/kylekatarnls/less.php and I confirm the bug. I will inspect it. |
@kylekatarnls - any insight on that? |
Not solved, I have the following clue: This fails only in the So it's something about getting all the variables when calculate an import path. |
Hi, it's fixed. Could you try to update to |
Unfortunately not. I still get the error, which is thrown in Less_Tree_Variable::compile(). When I var_dump the $env there, I see that the variable exists in $env->rules, but the function loops $env->frames looking for the variable. |
I confirm, something's missing in my merge. |
I'm so sorry, could you retry now? |
Sorry for the delayed answer, but - yeah works now. Thanks. |
Hi Guys, indreksiitan did you manage to get SemanticUI's LESS to compile ok. Im using octobercms which uses oyejorge/less.php to compile but am experiencing the same issues.
Any help would be great, thanks! |
Unfortunately not. I managed to put together a repeatable test case and been trying to get in contact with @kylekatarnls in various ways to send it to him, but have not been able to. |
Thanks for the reply.
Are you using october CMS?
in meantime i will keep looking for an answer and will let you know if i find anything.
|
Nope, we're using our own homegrown framework. |
is there a SASS version of semantic? |
Not that I'm aware of. |
Actually, there seems to be: https://github.com/doabit/semantic-ui-sass |
thanks. have just tried it and getting error if i include some element. the browser guest give me any info on the error though. Sorry to go off topic but how can i find the whats causing the error. i can pinpoint the file. thanks |
Tried the SCSS version. It compiles for me, although takes over 40 seconds to do so. |
But the real bummer is that there's virtually no customization besides font name and size - all colors etc are hardcoded. |
yeh it does take a while. if i disable importing or grid or menu it work but they both cant be imported or it throughs a error. stange. Going back to the Semantic LESS i think its down to this @{variable} thats the problem in string @import url. is there an other way to do this:
|
Getting this same issue when trying to dynamically import font from a hosted font service
|
I'm trying to include SemanticUI's LESS in my project and failing. They include their theme.config file, which sets a @themesFolder variable and then does @import "theme.less", which in turn tries to use the variable in another import: @import "@{themesFolder}/default/globals/site.variables", but fails stating that @themesFolder is not set.
So far, I've traced this down to:
Less_Tree_Import::ParseImport() imports theme.config and does:
$root = $parser->parseFile($full_path, $uri, true);
$ruleset = new Less_Tree_Ruleset(array(), $root->rules );
After that, the variable exists in $ruleset. It then calls:
$ruleset->evalImports($import_env);
Function evalImports($env) iterates through $this->rules and if the rule is an import, then calls:
$rules = $rule->compile($env);
Now, since the received $env is passed, what happens is that the variables defined in this particular ruleset up to the import are not available.
Am I on the right tracks? Is this a bug?
The text was updated successfully, but these errors were encountered: