UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

11 lines (10 loc) 271 B
/** * Return whether an element is `display: inline` */ export function isDisplayInline(element) { if (element.nodeType === 3) { return true; } const computedStyle = window.getComputedStyle(element); return computedStyle.display === 'inline'; }