It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do you manage your PDF Export stylesheets?

Felicity Chapman Feb 13, 2013

I need to customize the PDF export stylesheet for some spaces. Some of the spaces need the same customization, others need different customizations.

I'm finding it really hard to keep track of what's different from the global stylesheet in which space.

Ideally, I'd define all of the common CSS in the global stylesheet and then just add the few space customizations to the CSS in each space. However, Confluence doesn't seem to work like this. It seems that if there is a space CSS then this CSS is used, falling back to the Confluence default CSS for anything that's not included. If there is no space CSS defined at all for PDF Export then the Global CSS is used, falling back to the Confluence default CSS.

It would be much easier to maintain if any space CSS took highest precedence, followed by global CSS and then falling back on the default CSS only if there's no space or global definition.

How do you manage your CSS? any thoughts?

2 answers

1 accepted

1 vote
Answer accepted
Daniel Borcherding Feb 14, 2013

Hello Felicity,

I filed the following bug a while ago.

It appears as if using a Space CSS will cause Confluence to completely ignore any Global CSS.

You rightly point out that styles do not cascade as they are supposed to. Please feel free to add you own comments to that ticket. I will attach this post to the issue to further increase it's visibility.

Felicity Chapman Feb 14, 2013

Thanks for alerting me to your Jira issue. I've voted for it. It's frustrating that such a small omission makes the task of maintaining stylesheets so much harder.

By right the Space CSS should be on the first priority, however if it's not the case, perhaps you could add !important tag before the end of the semi colon. This tag will be the first priority wherever it's placed. You can get more information on this documentation.

Felicity Chapman Feb 13, 2013

Thanks for the quick response. Sorry. I obviously didn't explain very well.

Yes, the Space CSS takes precedence and then the export falls back to the Default CSS.

I think that itthe PDF export should try Space CSS, then the Global CSS before falling back to the Default CSS. It would allow you to put all common CSS elements in the Global CSS and just maintain any space quirks in the Space CSS.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

934 views 0 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you