From: Gabriel Wicke Date: Tue, 3 May 2016 23:14:43 +0000 (-0700) Subject: Print styles: Wrap CSS-generated URLs X-Git-Tag: 1.31.0-rc.0~7062^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=1d498e8bcbbfe0cbb437a5cd92f651e450ce85f4;p=lhc%2Fweb%2Fwiklou.git Print styles: Wrap CSS-generated URLs Chrome does not actually break CSS-generated URL content with word-wrap, which causes some infoboxes to expand to the entire page. This patch adds the word-break CSS property, which allows Chrome to break those URLs at any position. This fixes the rendering of infoboxes on pages like https://en.wikipedia.org/wiki/San_Francisco. With basically all PDF generators (including browsers) including clickable links & many PDFs consumed on-screen it might be worth considering making print URLs optional at some point, and defaulting to "screen optimized" PDFs. Change-Id: I8d03032a553643198da6a1dd8b78201a9255fcbb --- diff --git a/resources/src/mediawiki.legacy/commonPrint.css b/resources/src/mediawiki.legacy/commonPrint.css index ef239ed619..d04e3a6ae6 100644 --- a/resources/src/mediawiki.legacy/commonPrint.css +++ b/resources/src/mediawiki.legacy/commonPrint.css @@ -173,6 +173,7 @@ a { .mw-body a.external.text:after, .mw-body a.external.autonumber:after { content: " (" attr( href ) ")"; + word-break: break-all; word-wrap: break-word; }