Printing articles including link: content cut off on the right side

Hi.

We use a slightly modified flamingo style, but the following should not be edited by us. When we print articles with the browser print dialog we see that articles with at least one link exceed the paper width by up to 50 %. The content is extremely cut off on the right side. Also, the font size is much smaller. If I remove the links in the same article, all the text fits on the paper and the font size is as large as we expected.

Our fix at the moment is this:

/* FIX: Printing article including link: content cut off on the right */
/* caused by */
/* https://wiki.ndr.mobi/wiki/ndr/skin/skins/flamingo/print.min.css */
/* overrule width: auto!important */
@media print {
    #body, #xwikimaincontainer, #xwikimaincontainerinner, #xwikicontent, #mainContentArea {
        width: 100%!important;
    }
}

Has someone an idea why width: auto!important was set in the style and can someone confirm that finding with the bare original style?

Regards, Simpel

Yes, I could find it in the xwiki-platform source, in the module xwiki-platform-skin-resources, in the file print.css.

This was introduced in this commit in 2009 for the Colibri skin.
The ticket this commit fixed does not give much information about this specific change.


I do think it’s a leftover style that might very well be outdated and that we should change it considering the issue you faced. The bug ticket was filled for Colibri with IE, that we both don’t support anymore anyways, so I think it’s pretty safe to make changes on its fix.

@CharpentierLucas Should I open a ticket for this or did you do this already?

I didn’t open it yet, you can open it :+1:

Thanks a lot!
Have a good day :slight_smile:

Ticket created: Loading...

1 Like