- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
Formatting quoted code in blog posts: CSS2.1 white-space: pre-wrap
When migrating our blog posts from TypePad to WordPress, chunks of code presented the biggest problem. There was a lot of variation in how individual authors had marked up their code samples. Then there was the junk markup TypePad had inserted, of its own accord, inside <pre> and <blockquote> elements. In the end, I had get my hands dirty inside individual posts in WordPress. For future posts, however, we'll be standardizing our markup patterns and using CSS to style code quotes consistently. We're still working the kinks out of our stylesheets, so please bear with us when reading older posts.
In the meantime, I stumbled upon an informative post by Lim Chee Aun that offers a one-size-fits-all solution for implementing the CSS 2.1 "white-space: pre-wrap" declaration in today's user-agents. If you're not familiar with "white-sace: pre-wrap," it's a way to honor whitespace and line breaks within preformatted text, yet still allow individual lines to wrap when they reach the edge of their enclosing container. In short, it provides the browser equivalent of the "soft wrap text" option in your favorite IDE or text editor - which in many cases looks better than using "overflow: auto" to create an internal scrollbar on the container.
WordPress sucks, but it doesn’t matter
It was with great amusement that I read PHP Sucks, But It Doesn't Matter, a recent post from Jeff Atwood's Coding Horror. Here's an excerpt (emphasis his):
Some of the largest sites on the internet -- sites you probably interact with on a daily basis -- are written in PHP. If PHP sucks so profoundly, why is it powering so much of the internet?
The only conclusion I can draw is that building a compelling application is far more important than choice of language. While PHP wouldn't be my choice, and if pressed, I might argue that it should never be the choice for any rational human being sitting in front of a computer, I can't argue with the results.
With all my recent work on the Pathfinder blog migration, I've been getting to to know WordPress - and, by extension, PHP - pretty well. Now that the experience is (mostly) over, I've got a few observations about WordPress:
- It sucks.
- Its PHP foundation contributes to its suckiness.
- If you're a developer, it doesn't suck nearly as bad as other blogging platforms.
Let me elaborate.
About Pathfinder
Recent
- Roles Testing For Security
- Blackbird takes the pain out of JavaScript logging
- Making GWT JSON not Quite so Painful
- IDEA - preconference workshop 06 Oct 08
- HTML5, Ajax history management, and The Ajax Experience 2008 Boston
- A Look Back At Past Posts
- Flash Player on iPhone gossip
- Microsoft to Jump on Board EC2
- TAE Boston 2008: The Unsexy Presentations
- The Ajax Experience 2008: Hope to see you in Beantown
Archives
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006


