iruby icon indicating copy to clipboard operation
iruby copied to clipboard

Add CSS files in iruby notebook

Open Prakriti-nith opened this issue 6 years ago • 3 comments

I am facing a problem while adding CSS in IRuby notebook. Is there any method (like IRuby.javascript() to add js) to include CSS in IRuby notebook?

Prakriti-nith avatar Mar 25 '18 19:03 Prakriti-nith

@Prakriti-nith Could you try Jupyter notebook's custom.css?

mrkn avatar Apr 02 '18 04:04 mrkn

Yes, that will help but I need to load the CSS files from code. I am working on daru-view for which I have to load the dependent CSS file in IRuby notebook whenever user sets the plotting library. Any help would do.

Prakriti-nith avatar May 22 '18 06:05 Prakriti-nith

Would this work?

IRuby.display(IRuby.html(
    Erector.inline{ style raw(css_string) }.to_html
))

kylekyle avatar Jul 03 '18 17:07 kylekyle