Bug 35443

Summary: inline-block not honored as white-space:pre's last-child of a line
Product: WebKit Reporter: bradley.meck
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: bfulgham, kenorb, kevincox, laughinghan, marijnh
Priority: P2    
Version: 525.x (Safari 3.2)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Test Case none

bradley.meck
Reported 2010-02-26 12:17:53 PST
Created attachment 49611 [details] Test Case When an inline-block element is displayed at the end of an element with white-space:pre it will wrap to a new line if it is the last element on a line. According to the spec it seems that the inline-block should stay on the same line and not wrap to a new line when this occurs. A workaround but oddity is to include a non-empty TextNode after the inline-block.
Attachments
Test Case (792 bytes, text/html)
2010-02-26 12:17 PST, bradley.meck
no flags
Han
Comment 1 2014-01-13 18:30:01 PST
This bug is still extant in Chrome 31.0.1650.63 (Official Build 238485) and Safari 7.0 (9537.71), on both Mac OS X 10.9 and Windows 7. A workaround I found that doesn't add undesirable whitespace is to add an empty :after pseudo-element: http://jsbin.com/oQuBAmIJ/1/edit
Marijn Haverbeke
Comment 2 2014-10-30 02:29:35 PDT
I just want to confirm that this bug still exists (I got a bug report that is caused by this -- https://github.com/codemirror/CodeMirror/issues/2901). Would be wonderful if someone could take a look at it.
Brent Fulgham
Comment 4 2022-07-11 17:03:37 PDT
Safari, Chrome, and Firefox show the same rendering behavior for this test case. I do not believe any further compatibility issue remains.
Note You need to log in before you can comment on or make changes to this bug.