-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
CSS should not auto-add to the HTML #1
Comments
Interesting, thanks for the note! So you return the compiled, minified CSS as a string, correct? And then manually add that string to the new element you create in the iFrame? I'm absolutely amenable to adding an option of some sort that doesn't automatically append CSS -- makes fine sense. I'd like to keep the default behavior as simple as possible, but I think we could do that like so:
|
That's correct yes. I'm doing the same thing with HTML and it seemed logical to follow the same methodology for CSS. .text() looks great, although I'm assuming you'd have to add another method (.load() for example to to what you're already doing as standard, right? |
Oh right, I was thinking about a traditional node module, not a transformation. I'm not actually certain how best to pass an argument to a transformation. Any ideas? |
Some brief discussion of passing variables to transformations here. Will investigate. |
@wilson428 Is there any progress on this idea? |
Thanks for the nudge. There's some discussion of how configurations could be sent to transformations in this browserify issue, and @substack has suggested using environment variables. I'm inclined to use the latter since it's easier. Thoughts? Won't take long to implement I don't think. |
I'm not sure I like the idea of environment variables since it's very global. How would it work, might it conflict with other project's variables. |
I added a |
Closing this for now. Feel free to reopen if above solution is problematic. |
Hi there,
Thanks for the module - really helped me out. However what I was looking to do with this was append the required CSS into a child iframe, which was impossible without modifying the module.
I've forked the module and place it here: https://github.com/chrisjhoughton/node-lessify/blob/master/index.js. Thoughts? (Note - tests are temporarily removed as they weren't applicable as they were.)
Chris
The text was updated successfully, but these errors were encountered: