Source: styles/position.js

/**
 * Set the position of an element.
 * @param {'static' | 'relative' | 'absolute' | 'fixed' | 'sticky'} value The position to use
 */
export function position(value) {
    return { position: value };
}
/**
 * Left position of an element.
 * @param {UnitValue} val The value for the left position.
 */
export function left(val) {
    return { left: `${val.v}${val.u}` };
}
/**
 * Left position of an element.
 * @param {UnitValue} val The value for the left position.
 */
export function right(val) {
    return { right: `${val.v}${val.u}` };
}
/**
 * Left position of an element.
 * @param {UnitValue} val The value for the left position.
 */
export function top(val) {
    return { top: `${val.v}${val.u}` };
}
/**
 * Left position of an element.
 * @param {UnitValue} val The value for the left position.
 */
export function bottom(val) {
    return { bottom: `${val.v}${val.u}` };
}
/**
 * Set the z-index of an element.
 * @param {UnitValue} value The index of this element
 */
export function zIndex(value) {
    return { 'z-index': value };
}
/**
 * Configure how an eleemnt should fit in another element
 * @param {string} val The value for object-fit. (contain | cover | fill | none | scale-down)
 */
export function objectFit(val) {
    return { 'object-fit': val };
}