##// END OF EJS Templates
Add a comment that explains the notion of the default element...
Jonathan Frederic -
Show More
@@ -314,9 +314,10 b' class DOMWidget(Widget):'
314 314 keys = ['visible', '_css'] + Widget.keys
315 315
316 316 def get_css(self, key, selector=""):
317 """Get a CSS property of the widget. Note, this function does not
318 actually request the CSS from the front-end; Only properties that have
319 been set with set_css can be read.
317 """Get a CSS property of the widget.
318
319 Note: This function does not actually request the CSS from the
320 front-end; Only properties that have been set with set_css can be read.
320 321
321 322 Parameters
322 323 ----------
@@ -332,8 +333,9 b' class DOMWidget(Widget):'
332 333
333 334
334 335 def set_css(self, *args, **kwargs):
335 """Set one or more CSS properties of the widget (shared among all of the
336 views). This function has two signatures:
336 """Set one or more CSS properties of the widget.
337
338 This function has two signatures:
337 339 - set_css(css_dict, selector='')
338 340 - set_css(key, value, selector='')
339 341
@@ -346,7 +348,12 b' class DOMWidget(Widget):'
346 348 value
347 349 CSS value
348 350 selector: unicode (optional)
349 JQuery selector to use to apply the CSS key/value.
351 JQuery selector to use to apply the CSS key/value. If no selector
352 is provided, an empty selector is used. An empty selector makes the
353 front-end try to apply the css to a default element. The default
354 element is an attribute unique to each view, which is a DOM element
355 of the view that should be styled with common CSS (see
356 `$el_to_style` in the Javascript code).
350 357 """
351 358 selector = kwargs.get('selector', '')
352 359
General Comments 0
You need to be logged in to leave comments. Login now