I have a card macro to create a crad with several optional parameters. If an optional parameter is missing OR not given, then the macro ignore that part!
\define card(header:"Empty", title:"Empty" text:"Empty",footer:"Empty", width:"" class:"")
<div class="card mb-3 $class$" style="width:$width$;">
<$reveal type="nomatch" default="Empty" text=$header$ >
<div class="card-header">$header$</div>
</$reveal>
<div class="card-body">
<$reveal type="nomatch" default="Empty" text=$title$ >
<div class="h5 card-title">$title$</div>
</$reveal>
<$reveal type="nomatch" default="Empty" text=<<__text__>> >
<div class="card-text"><<__text__>></div>
</$reveal>
</div>
<$reveal type="nomatch" default="Empty" text=<<__footer__>> >
<div class="card-footer text-muted">$footer$</div>
</$reveal>
</div>
\end
This macro use reveal widget! If you look the raw html produced by TW you will see div generated inside span tag.
Is this a good practice in TW and html5? Is it valid?
p.s: It is important for me to have a clean code, easy to understand and follow standards (like html5 here)
Mohammad