There are multiple issues regarding elements being calculated as visible when they are hidden OR elements being calculated as hidden when they are visible. This issue is generally to be used to track the progress made for these fixes.
I think that it is interesting to note that jQuery ditched their visibility calculations in 3.0 and is likely worthwhile looking into why/how they made these decisions.
An element is considered now visible if it has a layout box returned from the DOM getClientRects() method, even if that box has a height and/or width of zero. This means that elements such as
or an empty element that don't have height are considered to be visible.
https://github.com/jquery/jquery/issues/2227
https://github.com/jquery/jquery/issues/2604
position: fixed elements having parent with pointer-events: none mistakenly display as not visible / covered by another el https://github.com/cypress-io/cypress/issues/6675should('be.visible') on a visible element - overflow hidden with position absolute outside https://github.com/cypress-io/cypress/issues/4395.should("be.visible") doesn't interpret elements with " style='transform: scale(0,0)' " correctly https://github.com/cypress-io/cypress/issues/723backface-visibility: hidden doesn't hide elements from cypress https://github.com/cypress-io/cypress/issues/2985.type() says failed element is not visible, but el is visible https://github.com/cypress-io/cypress/issues/1818should('not.be.visible') fails https://github.com/cypress-io/cypress/issues/683Cypress: 3.3.1
I've made a flowchart of our current implementation for visibility checks. This applies when using cy.get('el').should('be.visible'), etc as well as some other checks we do before actions are taken: .check(), .click(), .type() and some instances of .trigger()

Some notes upon review of the diagram on changes we want to make:
Separate out the "loose" checks from "strict" checks for visibility. Today is all "loose" checks -- "strict" checks concerns whether the element is visible within the viewport and the necessity to scroll to an element first.
visibility: collapse, is within css-path, etc., etc. etc.clientRect + elFromPoint and edge cases.I'm going to close this issue for tracking - as there are only a couple of remaining issues that should be resolved when opacity: 0 is considered, which there is a PR for.
Most helpful comment
I've made a flowchart of our current implementation for visibility checks. This applies when using
cy.get('el').should('be.visible'), etc as well as some other checks we do before actions are taken:.check(),.click(),.type()and some instances of.trigger()Some notes upon review of the diagram on changes we want to make:
Separate out the "loose" checks from "strict" checks for visibility. Today is all "loose" checks -- "strict" checks concerns whether the element is visible within the viewport and the necessity to scroll to an element first.
"Loose" visibility checks
visibility: collapse, is withincss-path, etc., etc. etc."Strict" visibility checks
clientRect+elFromPointand edge cases.Questions