from emailer_lib.mjml import spacer, text
child = text("Hello World")
result = spacer(child)mjml.spacer
mjml.spacer(*args, attributes=None, content=None)Create an MJML <mj-spacer> tag.
Parameters
*args : TagChild = ()-
Children (MJMLTag objects)
attributes : Optional[TagAttrs] = None-
Optional dict of tag attributes
content : Optional[str] = None-
Optional text content for the tag
Returns
: MJMLTag-
MJMLTag object representing
<mj-spacer>
Examples
With children:
With attributes:
result = spacer(attributes={"attr": "value"})With both:
result = spacer(child, attributes={"background-color": "yellow"})