Is there a CSS rule that would match elements based on their width? If not, would it be interesting to propose that in the standard?
One could do something like code:max-width(200px) { white-space: nowrap; }
to have all small code tag force line break.
I know I could use some js.