Set css style for output :param str css_style: CSS style string Example:: put_text('hello').style('color: red; font-size: 20px') put_row([ put_text('hello').style('color: red'), put_markdown('markdown') ]).style(
(self, css_style)
| 127 | show = send # `show` is a more user-friendly name |
| 128 | |
| 129 | def style(self, css_style): |
| 130 | """Set css style for output |
| 131 | |
| 132 | :param str css_style: CSS style string |
| 133 | |
| 134 | Example:: |
| 135 | |
| 136 | put_text('hello').style('color: red; font-size: 20px') |
| 137 | |
| 138 | put_row([ |
| 139 | put_text('hello').style('color: red'), |
| 140 | put_markdown('markdown') |
| 141 | ]).style('margin-top: 20px') |
| 142 | |
| 143 | """ |
| 144 | self.spec.setdefault('style', '') |
| 145 | self.spec['style'] += ';%s' % css_style |
| 146 | return self |
| 147 | |
| 148 | def onclick(self, callback): |
| 149 | """Add click callback to this widget. |
no outgoing calls
no test coverage detected