Whether to: React positively or negatively to the display: None. This means if you have an element and nothing is displayed on it, will :has still see that there is one? I think it will, because there's an element there. But I might need to compare it with:
:not([style*="display: none"])
Just confirm behavior
P粉6337331462024-04-03 14:56:50
Because of "display:none", we set the style inline in any code where the element will be hidden.
2 This is a paragraph.
P粉0042876652024-04-03 10:56:45
display
The attribute does not change the behavior of the selector because it does not change the DOM tree, so it will still work
Like if you have
Hi
div:has(p) { background: blue; padding: 5rem; } p { display: none; }