New issue
Advanced search Search tips

Issue 853750 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 853751
Owner: ----
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

De-selecting "content" property on a pseudo-element causes the pseudo-element to disappear

Reported by box_full...@hotmail.com, Jun 18 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36

Steps to reproduce the problem:
1. Inspect an element that includes a pseudo-element using the "content" property
2. In the "styles" panel of the developer tools, de-select the "content" property to disable it
3. Try to re-enable the "content" property

What is the expected behavior?
The "content" property should be disabled and the pseudo-element should disappear from the page. However, the "content" property should still be listed in the list of styles to allow it to quickly be enabled again for debugging purposes.

What went wrong?
The "content" property disappears completely and is no longer listed in the "styles" for the element. Thus, there is no way to re-enable the pseudo-element without refreshing the page.

Did this work before? No 

Chrome version: 67.0.3396.87  Channel: stable
OS Version: 10.0
Flash Version: 

I understand the concept behind why this happens (i.e. the "content" is essentially the element itself, thus removing it should remove the styles too), but for debugging styles related to pseudo-elements, this is a very inconvenient behavior.

In Firefox's dev tools, for example, you have the option to re-enable the "content" property instantly, with no page refresh. This should be the behavior with Chrome as well.

To do a quick test, here's a JS Bin demo that has a :before pseudo-element on the body element:

https://jsbin.com/yavuho/edit?html,css,output

And please note that this is not a "bug", so there's no need for a reduced test case. The above JS Bin should suffice to demonstrate the problem.
 
FYI - I accidentally submitted this with one of my old Google accounts. I've re-submitted it with an updated Google account. My bad, sorry for the duplicate. Please delete or disable this one and use the other one instead so I can be notified in the right account. Thanks.
Labels: Needs-Triage-M67
Labels: Triaged-ET
Mergedinto: 853751
Status: Duplicate (was: Unconfirmed)
As per comment#1 merging this issue to 853751.

Thanks!

Sign in to add a comment