scroll-padlock
Version:
CSS variables-based scrollbars locker
23 lines (22 loc) • 800 B
TypeScript
/**
* Sets CSS rules for the scroll padlock.
* @param options - The options for the scroll padlock.
* @param options.selector - A CSS selector string to identify the element.
* @param options.element - The DOM element to apply the padlock to.
* @param options.formatter - A function to format the computed layout properties.
* @returns The style element containing the CSS rules.
*/
export declare function setStyle(options?: {
selector?: string;
element?: Element | HTMLElement;
formatter?: (opts: {
offsetWidth?: number;
offsetHeight?: number;
clientWidth?: number;
clientHeight?: number;
scrollWidth?: number;
scrollHeight?: number;
scrollTop?: number;
scrollLeft?: number;
}) => string;
}): HTMLStyleElement;