@synergy-design-system/components
Version:
This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define
18 lines (17 loc) • 805 B
TypeScript
/**
* ---------------------------------------------------------------------
* 🔒 AUTOGENERATED BY VENDORISM
* Removing this comment will prevent it from being managed by it.
* ---------------------------------------------------------------------
*/
/**
* Returns an element's offset relative to its parent. Similar to element.offsetTop and element.offsetLeft, except the
* parent doesn't have to be positioned relative or absolute.
*
* NOTE: This was created to work around what appears to be a bug in Chrome where a slotted element's offsetParent seems
* to ignore elements inside the surrounding shadow DOM: https://bugs.chromium.org/p/chromium/issues/detail?id=920069
*/
export declare function getOffset(element: HTMLElement, parent: HTMLElement): {
top: number;
left: number;
};