html - javascript - why is this element non-visible on cnn.com? -
i'm developing chrome extension highlights parts of webpages. need decide elements visible user. current filtering logic checks these properties:
visibility, opacity, getboundingclientrect dimensions. these properties recognize cases, still find exceptions. e.g. ul element class "quick-links" on main page of cnn.com
this element has no obvious property makes invisible. why element non-visible? there way programmatically recognize scenario?
it looks quick-links container <div class="more-mega-nav"> has following properties, make children invisible user:
.more-mega-nav { opacity : 0; height: 0; overflow: hidden; } it looks overflow: hidden deciding factor, browser clips child content extends beyond parent's width , height.
Comments
Post a Comment