| Summary: | Unwanted vertical single-pixel gap appears between floated elements | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Richard Hallas <Richard> | ||||
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | zalan | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Mac (Intel) | ||||||
| OS: | OS X 10.10 | ||||||
| URL: | http://www.careyblyton.com | ||||||
| Bug Depends on: | 132010 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Richard Hallas
2015-06-09 09:58:51 PDT
The gap is caused by the fact that WebKit table rendering has not been transitioned to subpixel layout/rendering. The gap is formed between the pageidgraphic and pageidtext. However if the container's display type (paged) is changed from inline-table back to block, the gap disappears. I couldn't figure though why it is set to inline-table the first place. <div id="paged"> <span id="pageidgraphic"></span> <span id="pageidtext">Home</span> </div> zalan: Thank you very much for those extremely helpful comments. The reason why the container was set to inline-table was to do with what happens if the page isn't wide enough to accommodate all the text (i.e. if the breadcrumbs text becomes very long and the page happens to be very narrow). With inline-table set, the browser splits up and rewraps the content, and it remains visible; without it, the content pops off the bottom of the page. Anyway, after a little experimentation I've fixed the problem by removing the float: right; from the 'pageidtext' element. I can't remember at this stage why both elements were floated (perhaps that was a mistake), but I don't think they needed to be. By ceasing to float the text component and retaining the inline-table setting of the parent element, it continues to work as before in very narrow confines, but the pixel-gap problem goes away. So, my site is fixed; great! Thanks again. I still think it was worth reporting the problem, though, because the pixel-gap behaviour is new to recent versions of WebKit (it didn't exist when I created the site). > I still think it was worth reporting the problem, though, because the > pixel-gap behaviour is new to recent versions of WebKit (it didn't exist > when I created the site). Sure, thanks for reporting! This bug is now blocked by bug 132010. |