Return `w:style[@w:type="*{style_type}*][-1]` or |None| if not found.
(self, style_type)
| 290 | return style |
| 291 | |
| 292 | def default_for(self, style_type): |
| 293 | """Return `w:style[@w:type="*{style_type}*][-1]` or |None| if not found.""" |
| 294 | default_styles_for_type = [ |
| 295 | s for s in self._iter_styles() if s.type == style_type and s.default |
| 296 | ] |
| 297 | if not default_styles_for_type: |
| 298 | return None |
| 299 | # spec calls for last default in document order |
| 300 | return default_styles_for_type[-1] |
| 301 | |
| 302 | def get_by_id(self, styleId: str) -> CT_Style | None: |
| 303 | """`w:style` child where @styleId = `styleId`. |