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?
Hello Felicity,
I filed the following bug a while ago.
https://jira.atlassian.com/browse/CONF-27929
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.