Do Confluence pages support CSS `::before` selectors?

I've used {style} and {div} macros to make some custom sections on a Confluence page. And as a part of these sections, I've added a ::before selector with some content and styles to act as a label.

The CSS I've used follows:

div.section-wip {
	margin-left:20px;
	margin-bottom:20px;
	padding:10px;
	background-color:#ebeff5;
	border:1px dashed blue;
	border-radius:5px;
}
div.section-wip::before {
	content:"Work in Progress:";
	display:block;
	font-weight:bold;
	color:#606098;
}


div.section-planned {
	margin-left:20px;
	margin-bottom:20px;
	padding:10px;
	background-color:#eaf3ea;
	border:1px dashed green;
	border-radius:5px;
}
div.section-planned::before {
	content:"Planned Feature:";
	display:block;
	font-weight:bold;
	color:#4f884f;
}

 

Interestingly, it works perfectly in the Edit Preview, however it looks like the ::before selectors are ignored after saving the page, as this screenshot illustrates:

stupidconfluence.jpg

1 answer

Does ::before show up in the storage format? If not, what happens if you use something like the Source Editor add on?

Not sure exactly what you mean by "storage format," but if I use Confluence's "View Source" option, the ::before selectors are all there.

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...

2,943 views 27 12
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