Strange rendering order for block|flex|grid|table displayed images with border
Reported by
grzybe...@gmail.com,
Dec 12 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36 Steps to reproduce the problem: 1. Create two images next to each other. 2. Overlay one over the other one (by negative margin on transform). 3. Apply border to images. 4. Set the display property for images to block|flex|grid|table. What is the expected behavior? I would expect render in following order: 1. Border of image underneath. 2. Image underneath. 3. Border or fron image. 4. Front image. What went wrong? Rendering order is broken: I would expect render in following order: 1. Border of image underneath. 2. Border or fron image. 3. Image underneath. 4. Front image. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 63.0.3239.84 Channel: stable OS Version: OS X 10.13.2 Flash Version: I recreated issue in few lines of css. https://codepen.io/pawelgrzybek/pen/RxwKWw Please play around with display (block vs inline)
,
Dec 13 2017
Same behavior in Firefox. Also happens with text of preceding block painted over successor's border. Doesn't this follow from: https://www.w3.org/TR/CSS22/zindex.html#painting-order ? Adding pdr@ and mstensho@ to confirm.
,
Dec 13 2017
It behaves as the reporter expects in WebKit.
,
Dec 13 2017
But only for images. In WebKit, text from preceeding block also paints over succeeding block's border.
,
Dec 13 2017
Block-level images should behave like any other block. So, as long as they don't establish a stacking context, are positioned, floated, etc., borders and backgrounds of *all* such objects will be painted before the content inside (i.e. the image in this case). Those are painted in separate passes within each stacking context. WebKit is wrong. |
||
►
Sign in to add a comment |
||
Comment 1 by pbomm...@chromium.org
, Dec 12 2017Components: Blink>CSS
Labels: Needs-Triage-M63 Needs-Bisect