SpanStyle
^do( SpanStyle, text )^
Type: Macro
Purpose: Changes color and (optionally) font
The SpanStyle macro lets you swiftly apply color and font changes. The big mystery here was, “What should the primary argument be—color or font?”
We took a poll and the answer was color. So color is the 2nd arg; font, the optional 3rd arg.
Hover below to reveal BoxPress code
<span style="^if($3)^font-family: `$3`; ^endIf^^if($2)^color: $2;^endIf^">$1</span>
Note
This will replace the Color macro, which is now deprecated.
SpanStyle sample
This is the markup that is rendered below
Here is an ^do(SpanStyle, "example of using SpanStyle with a single arg", red)^—which is a color.
Here is an example of using SpanStyle with a single arg—which is color.
This is the markup that is rendered below
Here is ^do(SpanStyle, "another example of SpanStyle, this time using the optional 3rd arg", #008, Misfits)^—which is a font.
Here is another example of SpanStyle, this time using the optional 2nd arg—which is a font.