How to customize the Showcase macro using HTML macro

Summary

This KB requires the Confluence instance to enable the HTML Macro. Enabling these macros will open your Confluence site to cross-site scripting attacks. Do not enable them unless you trust all your users!

You are able to customize the Showcase macro by adding a HTML macro into the page and changing the variables for the following CSS classes:

  • .sr-showcase>.showcase-title (to format Showcase title)
  • .sr-showcase>.showcase-caption (to format Showcase description)
  • .sr-showcase  (to format Showcase)

Cause

You may want more customization options for the Showcase macro than what is available by default.

Workaround

For example, you can use the following syntax in the HTML macro to format the Showcase title, description and body:

<style>
.sr-showcase>.showcase-title    {
    background-color:black;
    color: red; border-bottom: 1px solid white;
    font-size: 30px;
}
.sr-showcase>.showcase-caption  {
    background-color:black; 
    color: lightgreen; 
    font-size: 20px;
}
.sr-showcase {
    height: 200px;
    width : 400px; 
    background-color: silver;
}
</style>