Skip to content

CSS fix to prevent error output from being breaking out of body element. #3500

Merged
merged 1 commit into from Nov 16, 2011

3 participants

@olivierlacan

Using the white-space: pre-wrap adds extra line breaks to prevent the text from breaking out of the element's box. In this case single line output can be extremely long, breaking out the element.

See for reference: http://www.quirksmode.org/css/whitespace.html

Before
Before

After
After

Note: This CSS property will be ignored in IE6 and 7, it is compatible with all other browsers (see prior reference).

@olivierlacan olivierlacan CSS fix to prevent error output from being breaking out of body element.
Using the white-space: pre-wrap adds extra line breaks to prevent the text from breaking out of the element's box. In this case single line output can be extremely long, breaking out the <body> element.

See for reference: http://www.quirksmode.org/css/whitespace.html

Before: http://link.olivierlacan.com/BVU4
After: http://link.olivierlacan.com/BUfM
a50f659
@henrikhodne

Nice. Is there any way to get this to work in IE 6 and 7 too? Yes, yes, I know IE 6 is no longer supported by Microsoft, and IE 7 is way old as well, but it still would be nice to support all browsers.

Update: Nice, round pull request number.

@olivierlacan

Hehe, actually there seems to be.

Apprently this works in IE6

word-wrap: break-word;

See http://css-tricks.com/snippets/css/make-pre-text-wrap/

I'll try it and update the pull request accordingly.

@jonleighton
Ruby on Rails member

I'm merging this. FWIW I don't think we need IE6 support. This page is just seen by developers, who I hope to god are not using IE6.

@jonleighton jonleighton merged commit 272f2b7 into rails:master Nov 16, 2011
@olivierlacan

Good point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.