From c4368c8a23790b93e51a8fc6c240584414220f9e Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Thu, 11 Oct 2012 20:02:33 +0000 Subject: [PATCH] Twenty Ten and Eleven: more elegant fix for long word overflow in sidebars. Also improves image resizing for images in widgets in Twenty Ten. Props obenland, fixes #21151; see #21503 also. git-svn-id: http://core.svn.wordpress.org/trunk@22195 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyeleven/style.css | 4 ++++ wp-content/themes/twentyten/style.css | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/twentyeleven/style.css b/wp-content/themes/twentyeleven/style.css index 755919875b..9f6f1caf8a 100644 --- a/wp-content/themes/twentyeleven/style.css +++ b/wp-content/themes/twentyeleven/style.css @@ -1752,6 +1752,10 @@ section.recent-posts .other-recent-posts li:after { font-size: 12px; } .widget { + word-wrap: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; clear: both; margin: 0 0 2.2em; } diff --git a/wp-content/themes/twentyten/style.css b/wp-content/themes/twentyten/style.css index 4a492cb234..e5998ce90a 100644 --- a/wp-content/themes/twentyten/style.css +++ b/wp-content/themes/twentyten/style.css @@ -784,7 +784,8 @@ img.size-auto, img.size-full, img.size-large, img.size-medium, -.attachment img { +.attachment img, +.widget-container img { max-width: 100%; /* When images are too wide for containing element, force them to fit. */ height: auto; /* Override height to match resized width for correct aspect ratio. */ } @@ -1132,8 +1133,15 @@ h3#reply-title { display: none; } .widget-container { + word-wrap: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; margin: 0 0 18px 0; } +.widget-container .wp-caption img { + margin: auto; +} .widget-title { color: #222; font-weight: bold;