@dvcol/common-utils
Version:
Typescript library for common utility functions and constants
29 lines (27 loc) • 602 B
JavaScript
// lib/common/utils/style.utils.ts
var zIndexMax = 2147483647;
var addCustomProperty = (definition, throwOnError = false) => {
try {
window.CSS.registerProperty(definition);
} catch (error) {
(throwOnError ? console.error : console.warn)(`Failed to register custom CSS property: ${definition.name}`, definition, error);
if (throwOnError) throw error;
}
};
var zIndex = {
behind: -1,
default: 0,
inFront: 1,
layer1: 10,
layer2: 100,
layer3: 200,
layer4: 300,
layer5: 400,
layerUI: 1e3,
layerMax: zIndexMax
};
export {
zIndexMax,
addCustomProperty,
zIndex
};