On Tue, 2011-07-12 at 08:48 +0200, Joerg Jaspert wrote: > We mainly have the Debian CSS on planet and should try to not get away > from that too much. But sometimes.... Now, Im no CSS expert, so dont > know if that is bad with the rest of the css we have (dont think so, but > who knows), so I CCed debian-www, so they can yell up if they think its > bad to do so. If not feel free to commit sometime this evening and poke > me on irc to update the site. Ok, some more details: The post that caused this issue has since scrolled off Planet Debian derivatives. The issue was that it had a really long line inside of a <code> tag, such that the page was widened considerably. To prevent that from happening again I would like to apply some CSS to make <pre> <code> and <tt> content wrap nicely. The following using white-space: pre-wrap in planet.css should do that nicely. The overrides "! important" are needed because debian.css already defines the white-space property for <pre> <code> and <tt>. There are multiple lines for each tag type because some versions of some browsers don't support pre-wrap and some support it via a custom property. On www.d.o Debian controls the content so we can fix any widening issues there quite easily, so non-wrapping <pre> <code> and <tt> is acceptable. IIRC non-wrapping white-space is the default for <pre> <code> and <tt> so I'm not sure why debian.css needs to define them in the first place though. Personally I'd like to see this CSS on lists.debian.org too. /* Make pre's wrap to the window */ pre { white-space: normal ! important; } pre { white-space: -moz-pre-wrap ! important; } pre { white-space: pre-wrap ! important; } code { white-space: normal ! important; } code { white-space: -moz-pre-wrap ! important; } code { white-space: pre-wrap ! important; } tt { white-space: normal ! important; } tt { white-space: -moz-pre-wrap ! important; } tt { white-space: pre-wrap ! important; } -- bye, pabs http://wiki.debian.org/PaulWise
Attachment:
signature.asc
Description: This is a digitally signed message part