From 1d498e8bcbbfe0cbb437a5cd92f651e450ce85f4 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Tue, 3 May 2016 16:14:43 -0700 Subject: [PATCH] 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 --- resources/src/mediawiki.legacy/commonPrint.css | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.20.1