Bug 35443 - inline-block not honored as white-space:pre's last-child of a line
Summary: inline-block not honored as white-space:pre's last-child of a line
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-26 12:17 PST by bradley.meck
Modified: 2015-09-13 05:52 PDT (History)
4 users (show)

See Also:


Attachments
Test Case (792 bytes, text/html)
2010-02-26 12:17 PST, bradley.meck
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description bradley.meck 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.
Comment 1 Han 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
Comment 2 Marijn Haverbeke 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.