:has()-Selector in combination with ::after-element does not work correctly
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: tobergte, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
87.79 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:123.0) Gecko/20100101 Firefox/123.0
Steps to reproduce:
I have used the :has()-Selector in combination with an ::after-pseudo-element e.g. ".classname:has(.class)::after"
Actual results:
This produces the bug, that if the class inside the has-selector is not set, you still get the pseudo-element without any styles.
Expected results:
The pseudo-element should not be placed insite the DOM
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Can you attach a test-case? Without it it's hard to investigate. My guess is that this is bug 1876962
Comment 2•2 years ago
|
||
Reporter: just a reminder, please attach a testcase (rather than a screenshot of some styles) so we can take a look here. Thanks!
Comment 3•2 years ago
•
|
||
Alternately, if it's easier than producing a sharable testcase/URL: could you test Firefox Nightly ( https://nightly.mozilla.org/ ) and see if you can reproduce the bug there with whatever site you're hitting this issue on? Current Nightly includes the fix for the bug that emilio mentioned -- so if his hunch is correct, then hopefully you'll see this issue fixed in Nightly.
Comment 4•2 years ago
|
||
@tobergte - sorry for just adding on here. I did try to create a simplified test case based on your description and screenshot, but it seems to work fine even in currently Firefox stable v122 - https://codepen.io/scheinercc/pen/xxBMEmy
Feel free to clone the Pen and change to replicate the issue you experienced.
Comment 5•2 years ago
|
||
Closing as "incomplete" since a month has passed since the request-for-testcase; we can't proceed without that.
Please reopen if you can provide a testcase or a link to a demo that reproduces the issue. Thanks! (In the meantime, we can hope that emilio's theory in comment 1 was correct and this was a version of bug 1876962.)
Description
•