roborourke / wp-less

Provides a LESS compiler compatible with wp_enqueue_style() for rapid CSS development in themes and plugins.
MIT License
217 stars 55 forks source link

Import problem when attempting to use variables file second time #45

Closed hsz closed 9 years ago

hsz commented 11 years ago

I have base.less stylesheet which includes colors.less. Importing works well, I can use @color-red color in base.less.

When I use second stylesheet project.less which also includes colors.less, it does not loads defined variables.

The problem is caused by last change in lessc.inc.php.

if (isset($this->allParsedFiles[realpath($realPath)])) {
  return array(false, null);
}

Second try to import colors.less breaks tryImport function because it was already loaded and does not injects colors.less variables.

If I comment out return line, it works well again.

roborourke commented 11 years ago

Hi Jakub,

Is it possible for you to just import project.less into base.less after you import colors.less?

Can you add this as an issue to the lessphp repository as well?

hsz commented 11 years ago

Hello Robert,

It is not possible because of hierarchical stucture of included stylesheets (every subpage loads base.less and file specified for its context.

I can create an issue at lessphp repo.

https://github.com/leafo/lessphp/issues/466

roborourke commented 9 years ago

issue on parent repo, not something I can fix here at least