Style Macros
On the Styles tab, you can define how specific macros will be formatted in your exports.
Apply macro styles
In the Macros section of the template editor panel, you can define the default styling for macros on your pages. Styles can be applied to the following macros:
- Info, Tip, Note, & Warning
- Panel
- Status
- Code Block
- Scroll Title (Table Captions & Figure Captions)
Please note, that since Atlassian has introduced the new cloud editor experience and changed the naming protocols for the admonition macros (eg. Info, Error macros etc), there are inconsistencies for the names used in Confluence Cloud and in the template editor. This is because the old macro names are still used for admonition macros in the old cloud editor format and also for all server and data center deployment types of Confluence. At the moment, the only workaround is to use the previous names for the mapping. However, please note that the Note macro in the new Cloud editor cannot yet be styled. We have an open feature request which you can track here - EXP-2796
Overview of naming differences;
- Error macro in Confluence Cloud = Warning macro style in PDF editor
- Note macro in Confluence Cloud = Cannot be styled
- Warning macro in Confluence Cloud = Note macro style in PDF editor
- Success macro in Confluence Cloud = Tip macro style in PDF Editor
- Info macro in Confluence Cloud = Info macro style in PDF editor
When you export Confluence content, it will be styled in accordance with the styles configured on this screen. For example, if you change the border color to blue for the Info macro, all the corresponding Info macros will have a blue border when exported from Confluence:
The inbuilt template editor contains a Preview section which offers a live view for your chosen styling choices – these automatically appear as you make edits.
Modify styles
Macro styles can be modified in a number of ways – you can change the following properties:
Category | Property | Description |
---|---|---|
General (Panel & Code Block macros only) | Margins (pt) |
|
Title / Body |
| |
Font | Overwrite style of |
|
Font |
| |
Style |
| |
Size (pt) |
| |
Line height (%) |
| |
Color |
| |
Case |
| |
Section | Icon (only for Warning, Note, Tip, Info) |
|
Icon size (only for Warning, Note, Tip, Info) |
| |
Icon color |
| |
Alignment |
| |
Margin (mm) |
| |
Padding (mm) |
| |
Background |
| |
Background color |
| |
Numbering (Table / Figure Captions only) | Level style |
|
Prefix |
| |
Suffix |
| |
Indent (pt) |
| |
Border | Top/Bottom/Left/Right |
|
Type |
| |
Strength (pt) |
| |
Border Radius (pt) |
| |
Border color |
|
Next steps
Now you have styled your Confluence macros, you can define the structure of your template – and fine-tune the design – on the 'Document Sections' tab.