<div dir="ltr"><div><div>For reference, I see this:<br><br><img alt="Inline image 3" src="cid:ii_14954a313d677558" height="201" width="520"><br><br>ah, the _dom_classes may have been more recent than that. Here's the change, landed sept 23: <a href="https://github.com/ipython/ipython/pull/6235">https://github.com/ipython/ipython/pull/6235</a><br><br>you may have to go back to something like:<br></div><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">w = HTML("text")<br>w.on_displayed(lambda x: w.add_class("alert-warning")<br></blockquote><br></div>When you want to change it, you'd then have to:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">w.remove_class("alert-warning")<br>w.add_class("alert-success")<br></blockquote><div><br></div><div>In the new core widgets, a traitlet manages these directly:<br><a href="https://github.com/ipython/ipython/blob/master/IPython/html/widgets/widget_button.py#L36">https://github.com/ipython/ipython/blob/master/IPython/html/widgets/widget_button.py#L36</a><br></div><div>And all the class adding/removing is done on the client side.<br></div><div><br>In my <a href="https://github.com/bollwyvl/ip-bootstrap">bootstrap librar</a>y i have been tinkering with, I did the same, though a little differently.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 27, 2014 at 8:55 PM, Adam Hughes <span dir="ltr"><<a href="mailto:hughesadam87@gmail.com" target="_blank">hughesadam87@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, but when you do this in your notebook, does it appear in a different colors?  Mine looks like plain text.  IE I literally see:<div><br></div><div><div style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:20px">info</div><div style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:20px">danger</div><div style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:20px">warning</div><div style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:20px">success</div></div><div style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:20px"><br></div><div style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:20px">In my output cell, instead of pretty colors like the example on the bootstrap link.  Using about a 2week-old version of 3.0 dev, if that matters.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Oct 27, 2014 at 8:50 PM, Nicholas Bollweg <span dir="ltr"><<a href="mailto:nick.bollweg@gmail.com" target="_blank">nick.bollweg@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">right, you'd switch it out to another context:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">from IPython.html import widgets<br>from IPython.display import display<br>for context in ["info", "danger", "warning", "success"]:<br>    display(widgets.HTML(value=context, _dom_classes=["alert", "alert-" + context]))<br></blockquote></div>
<br></div></div><span class="">_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>