The <<style>> Macro
Syntax
<<style [class="class-name"] [style="css-styles"] [force_div=True]>> Styled text goes here. <</style>>
About
The <<style>>
macro allows you to add CSS styles and classes to text, tables, and other items. One of the main ways to do this is through the Box Styles and HTML Table Styles that are available, but you can also add custom CSS styles.
There is also the ability to embed styles within styles. For this, there are aliases of the style macro labeled style2 through style5. When using one of the style aliases, be sure to use it when opening and closing. For example: <<style3>>something<</style3>>
force_div=True
is for times when, for one reason or another, the Creole parser gets confused and doesn't quite format things correctly. This option can fix some of those errors.
Examples
Text color
<<style style="color: green;">> This text is green. <</style>>
displays as:
This text is green.
Embedded Styles
<<style style="color:green;">>Green text, <<style2 style="color:red;">>then red, <<style3 style="color:blue;">>then blue,<</style3>> then back to red,<</style2>> and finally back to green.<</style>>
displays as:
Green text, then red, then blue, then back to red, and finally back to green.
Table backgrounds
=|=Heading1 |=Heading2 | |=Heading3 |<<style style=" width: 100%; text-align: center; background-color: lightcoral">> - <</style>>|<<style style=" width: 100%; text-align: center; background-color: mediumseagreen">> x <</style>>|
displays as:
Heading1 | Heading2 | |
---|---|---|
Heading3 | - | x |