mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 16:30:27 +00:00
5 lines
282 B
TypeScript
5 lines
282 B
TypeScript
|
|
export function getOuterHeight(element: HTMLElement): number {
|
||
|
|
const marginTop = parseFloat(getComputedStyle(element).marginTop) || 0;
|
||
|
|
const marginBottom = parseFloat(getComputedStyle(element).marginBottom) || 0;
|
||
|
|
return element.offsetHeight + marginTop + marginBottom;
|
||
|
|
}
|