Summary: | "wrap" attribute not supported on <pre> | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Young <daver> | ||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cmarcelo, ian, robert, shadowofged | ||||
Priority: | P2 | Keywords: | HasReduction | ||||
Version: | 412 | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.4 | ||||||
URL: | http://www.stuffonfire.com/tmp/prewrap.html | ||||||
Attachments: |
|
Description
David Young
2005-06-11 08:42:45 PDT
Additional information: http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/wrap.asp http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/wordwrap.asp I may be wrong, but i think this is equivalent to the new CSS2.1 white-space property value, "pre-wrap." I think you're right. The CSS 2.1 even gives the following example to mimic IE's proprietary wrap parameter: "In addition, the effect of an HTML PRE element with the non-standard "wrap" attribute is demonstrated by the following example:" pre[wrap] { white-space: pre-wrap } We would need a test case. The css 2.1 test suite we've landed does not seem to have a test for this. Created attachment 5716 [details]
testcase
Added a testcase, even with <pre wrap="soft> and <pre wrap="hard"> in it... Don't know if we should support that though. This is useful for styling <code> tags using CSS; currently just setting white-space: pre; is undesirable, because on small windows (or long lines of code), this forces the code to flow across other parts of the page. For <code>, the desirable effect is to have "white-space: pre-wrap;" with soft wrapping, though I cannot speak as to whether it's useful to support both hard and soft wrapping... Regarding my comments in #7: Looks like I was using <code> incorrectly; I got its default behavior confused with that of <pre>. However, <pre> still flows text outside of its box for small windows or long lines, which was already known, so please pardon the bump. This looks like it's working now. It does look like there's nothing to do in this bug anymore. So please shout if you disagree! |