Set some style via CSS style. Replaces complete style spec.
(self, text)
| 2284 | return child |
| 2285 | |
| 2286 | def add_style(self, text): |
| 2287 | """Set some style via CSS style. Replaces complete style spec.""" |
| 2288 | style = self.get_attribute_value("style") |
| 2289 | if style is not None and text in style: |
| 2290 | return self |
| 2291 | self.remove_attribute("style") |
| 2292 | if style is None: |
| 2293 | style = text |
| 2294 | else: |
| 2295 | style += ";" + text |
| 2296 | self.set_attribute("style", style) |
| 2297 | return self |
| 2298 | |
| 2299 | def add_subscript(self, text=None): |
| 2300 | """Add a subscript ("sub" tag)""" |
no test coverage detected