<div dir="ltr"><div><div><div>Here's the only usage as I found in the source:<br><span style="color:rgb(51,51,51);font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;display:inline!important;float:none;background-color:rgb(248,238,199)">container </span><span class="" style="color:rgb(167,29,93);font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px">=</span><span style="color:rgb(51,51,51);font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;display:inline!important;float:none;background-color:rgb(248,238,199)"> Box(</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px">_dom_classes</span><span class="" style="color:rgb(167,29,93);font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px">=</span><span style="color:rgb(51,51,51);font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;display:inline!important;float:none;background-color:rgb(248,238,199)">[</span><span class="" style="color:rgb(24,54,145);font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px"><span class="" style="color:rgb(24,54,145)">'</span>widget-interact<span class="" style="color:rgb(24,54,145)">'</span></span><span style="color:rgb(51,51,51);font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:16.8px;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;display:inline!important;float:none;background-color:rgb(248,238,199)">])<br><br></span><a href="https://github.com/ipython/ipython/blob/0c6a0f7982d430b3e4ff55c1fa04aca58a4fdb16/IPython/html/widgets/interaction.py#L184">https://github.com/ipython/ipython/blob/0c6a0f7982d430b3e4ff55c1fa04aca58a4fdb16/IPython/html/widgets/interaction.py#L184</a><br><br></div><div>Looks like each tuple member is a triple of (selector, property, value):<br><br></div></div><span style="font-family:monospace,monospace">txt = widgets.Text(value="Stratocaster")<br>display(txt)<br>txt._css = [<br></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">  ("input", "font-family", "Comic Sans MS"),<br></span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">  (None, "transform", "matrix(1, -0.2, 0, 1, 0, 0)")<br></span></span>]</span><br><br></div>Pretty slick!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 6, 2015 at 5:48 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@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">Hi all,<div><br></div><div>Does anyone have an example of how to apply CSS to a notebook widget in IPython 3.0?  Old versions offered the set_css method, but that has been removed in the latest version.</div><div><br></div><div>I see in the widget transition doc:</div><div><br></div><div><a href="https://github.com/ipython/ipython/wiki/IPython-3.0-comm-and-widget-migration-document" target="_blank">https://github.com/ipython/ipython/wiki/IPython-3.0-comm-and-widget-migration-document</a><br></div><div><br></div><div>that set_css has been superseded by the CSS attributes (works fine for most things, but not for obscure CSS settings) and the _dom_classes and _css tuples (not dictionaries as indicated in the transition doc).  The latter seems perfect, but it's not clear to me how to use these tuples.</div><div><br></div><div>Is there an example somewhere I can look at?</div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Nathan</div></font></span></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>