Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/internal/test/element-visible-overflow.d.ts

12 lines
660 B
TypeScript
Raw Permalink Normal View History

2024-01-30 10:59:28 -05:00
/**
* Given a parent element featuring `overflow: hidden` and a child element inside the parent, this
* function determines whether the child will be visible taking only the overflow of the parent into account
* Id does NOT check whether it is hidden or overlapped by another element
* It basically checks whether the bounding rects of the parent and the child overlap
*
* @param {HTMLElement} outerElement - The parent element
* @param {HTMLElement} innerElement - the child element
* @returns {Boolean} whether the two elements overlap
*/
export declare const isElementVisibleFromOverflow: (outerElement: Element, innerElement: Element) => boolean;