Skip to content

Allow modifyVars callback #1957

Closed
Closed

Description

@DaleyKD

I have a true need to 'intercept' the created CSS generated by LESS js. In 1.5.0, I was able to overload loadStyleSheets and return root.toCSS(less) for my purposes.

However, in 1.6.0 and greater, the minifier was changed, and loadStyleSheets doesn't retain its function name. Therefore, I can't find a way to get the CSS that was generated.

I thought I could just obtain it from the head, but IE does a nasty transposition to the set CSS, not allowing me to get the pure LESS-generated CSS.

Am I missing something, or is this an enhancement request?

For now, I've reverted to 1.5.0, and life is peachy.

Thanks in advance,
Kyle

Activity

  1. DaleyKD commented on Apr 11, 2014

    @DaleyKD
    Author

    That, sir, is EXACTLY what I needed. I didn't realize it was a new feature. Glad to have it.

    I have implemented it in my solution, and it works perfectly.

    I'm not sure if documentation has been updated, but if anyone sees this thread, be sure that in your callback function, you return the style so LESS can continue. In my case, I just copied it to a local variable and then "return styles;".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions