first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
/**
* Detects whether an element's content has horizontal overflow
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
export function hasHorizontalOverflow(element) {
return element.clientWidth < element.scrollWidth;
}
/**
* Detects whether an element's content has vertical overflow
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
export function hasVerticalOverflow(element) {
return element.clientHeight < element.scrollHeight;
}
/**
* Detects whether an element's content has overflow in any direction
*
* @public
* @param element - Element to check for overflow
* @returns True if element's content overflows
*/
export function hasOverflow(element) {
return hasHorizontalOverflow(element) || hasVerticalOverflow(element);
}
//# sourceMappingURL=overflow.js.map