I finally came around to writing up the details behind the CSS-only code listings I use on my blog. These listings wrap on page resize with line continuation markers, show scrollbars past a configurable minimum width, support native text selection without the line numbers being copied, and number lines in plain CSS without any JS involved. Have a look, the post is simultaneously a demo: