Search code examples
htmlcssgoogle-chromepseudo-elementcss-content

Google Chrome Dev Tools remove element's :after from DOM when :after display is none


My problem is about Google Chrome Dev Tools when I want to set display: none; to an after in DOM for a moment but Chrome remove all afters elements from DOM and I can't access to them again. My Chrome version is the last. Is there any solution in Google Chrome Dev Tools setting for this issue? Thank you for your attention.


Solution

  • There does not appear to be an option to disable this behavior, but a workaround is to select the originating element to which the ::after you were switching off was attached and you'll find its ::after pseudo-element CSS rule in the Styles panel (at the bottom within sections called "Pseudo ::after element"), complete with the display: none declaration you just added.