Nested css selectors not grabbing correct elements
Reported by
howard.j...@gmail.com,
Apr 18 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2711.0 Safari/537.36 Example URL: http://codepen.io/hjing/pen/xVjvwB Steps to reproduce the problem: 1. Hover over the div that says "Hover here!" What is the expected behavior? The grandchild's background color turns green What went wrong? The grandchild's background color remains pink Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? Yes chrome 49 Does this work in other browsers? No Firefox 45.0.2 Chrome version: 52.0.2711.0 Channel: canary OS Version: OS X 10.11.4 Flash Version: Shockwave Flash 21.0 r0 The `.child:before` pseudo element with the comma is important: ``` .child:before, .child { // ... } ``` If you remove that line, the grandchild turns green as expected. Also, if you separate into two css blocks: ``` .child:before { // ... } .child { // ... } ``` the grandchild also turns green as expected. See this codepen: http://codepen.io/hjing/pen/KzePBK for the full code snippet. The grandchild turns green in Safari Version 9.1 (11601.5.17.1). It also turned green in chrome 49. It started remaining pink after upgrading to chrome 50.
,
Apr 18 2016
Yup, confirmed.
,
Apr 19 2016
,
Apr 19 2016
Able to reproduce on Windows 7, Ubuntu 14.04 and Mac OS 10.11.4 using chrome stable M59-50.0.2661.75 and canary M52-52.0.2712.0 Bisect Information: ===================== Good build: 50.0.2624.0 Bad Build : 50.0.2626.0 Change Log URL: https://chromium.googlesource.com/chromium/src/+log/5c174785589ff4d446671eae01bbeb3a045b04c8..deb2b1a6835b09ad4617131a70dab9092a240f31 From the above blink log suspecting below Review URL: https://codereview.chromium.org/1592593002 ericwilligers@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner. Thanks!
,
Apr 21 2016
tools/bisect-builds.py identified #370088 https://codereview.chromium.org/1600793002
,
Apr 21 2016
The :before is in a non-rightmost compound and the whole selector is correctly dropped. This is a bug-fix. The behavior is the same in Gecko. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by howard.j...@gmail.com
, Apr 18 201610.0 KB
10.0 KB View Download
9.5 KB
9.5 KB View Download