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?
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.
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.
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.
Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time! We're looking for people to participate in a remote 1-hr workshop...
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!
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