MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / style

Method style

pywebio/io_ctrl.py:129–146  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 11

basic_outputFunction · 0.80
on_key_pressFunction · 0.80
mainFunction · 0.80
output_widgetsFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
put_codeFunction · 0.80
put_gridFunction · 0.80
leFunction · 0.80
_eFunction · 0.80
jquery.min.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected