Customize inline code block background and font colors in all pages and spaces


I want to have inline code blocks (called monospaced text in editor) to have background color and font color different from default. I need it on css level, so it will be applied to all pages and spaces (unless customized otherwise in editor).

I think it would require adding custom css snippet but I can't find where I should put it. Css like:

code {
  background-color: #e67300;
  color: #333;

1 answer

Hi Alex,

Unfortunately with OnDemand you cannot add your own custom CSS as all of the entry points that would allow you to do this in the download version (HTML Macro, User Macro, Custom Themes, Custom HTML, Space Layout, etc.) are restricted with OnDemand to avoid potential security or stability problems that custom HTML/CSS/Javascript could cause.

Only think I can think of is if one of the pre-defined themes for the Code Macro ( is close to what you want then encourage users to use that particular formatting when entering code blocks.

Far from ideal for what you want to do I know, but is this of some help?


Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

387 views 21 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you