[Webkit-unassigned] [Bug 277230] .class1:not(.class1:has(iframe), .class1:has(.class2)) behaves unexpectedly on webkit engines
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 29 20:28:25 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=277230
--- Comment #2 from fuad.tariq at yahoo.com <fuad.tariq at yahoo.com> ---
Created attachment 472011
--> https://bugs.webkit.org/attachment.cgi?id=472011&action=review
Reproduces the CSS bug described in bug report
Steps to reproduce:
1. Press Add Iframe, red padding-top: 20% should disappear. It doesn't.
2. Press Remove Iframe.
3. Press Add Error, red padding-top: 20% should disappear. It does.
4. #1 should have the same behavior as #3.
The CSS lines of concern in this test case are:
&:not(:has(iframe), :has(.error)) {
padding-top: 20%;
background-color: #ff0000; /* Red background to visualize the padding */
}
When I read the above line, I understand that padding-top: 20% and background-color: #ff0000 should ONLY be applied when .video does NOT have an iframe or a .error element. And that is exactly what you'd see on page load when there's no iframe or .error in .video. But then once you add an iframe, the padding-top: 20% and background-color #ff0000 should be gone, right? Well on Chromium they would be, but on webkit they're still there. Maybe webkit just understands this rule differently, but does it at least apply it consistently? It seems not. Because if we remove the iframe and add .error instead, it actually removes the padding-top: 20% and background-color: #ff0000... which is the expected behavior that should apply when iframe is added as well.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240730/ef55a5a8/attachment.htm>
More information about the webkit-unassigned
mailing list