/** * Function that returns a CSS `calc()` addition string. * CSS vars will be automatically wrapped in `var()` if provided. * * ```ts * const styles = { * // returns 'calc(var(--cnvs-sys-space-x1) + 0.125rem)' * padding: calc.add("--cnvs-sys-space-x1", '0.125rem'), * } * ``` * * @param augend * The base value. E.g. '1rem' or '--cnvs-sys-space-x4' * * @param addend * The value being added to the base. E.g. '1rem' or '--cnvs-sys-space-x4' * * @returns 'calc(augend + addend)' */ declare function add(augend: string, addend: string): string; /** * Function that returns a CSS `calc()` subtraction string. * CSS vars will be automatically wrapped in `var()` if provided. * * ```ts * const styles = { * // returns 'calc(var(--cnvs-sys-space-x1) - 0.125rem)' * padding: calc.subtract("--cnvs-sys-space-x1", '0.125rem'), * } * ``` * * @param minuend * The base value. E.g. '1rem' or '--cnvs-sys-space-x4' * * @param subtrahend * The value being subtracted from the base. E.g. '1rem' or '--cnvs-sys-space-x4' * * @returns 'calc(minuend - subtrahend)' */ declare function subtract(minuend: string, subtrahend: string): string; /** * Function that returns a CSS `calc()` multiplication string. * CSS vars will be automatically wrapped in `var()` if provided. * * ```ts * const styles = { * // returns 'calc(var(--cnvs-sys-space-x1) * 3)' * padding: calc.multiply("--cnvs-sys-space-x1", 3), * } * ``` * * @param multiplicand * The base value being multiplied. E.g. '1rem' or '--cnvs-sys-space-x1' * * @param multiplier * The value being multiplied to the base. E.g. 2 or '--cnvs-sys-space-x1' * * @returns 'calc(multiplicand * multiplier)' */ declare function multiply(multiplicand: string, multiplier?: string | number): string; /** * Function that returns a CSS `calc()` division string * CSS vars will be automatically wrapped in `var()` if provided. * * ```ts * const styles = { * // returns 'calc(var(--cnvs-sys-space-x1) / 2)' * padding: calc.divide("--cnvs-sys-space-x1", 2), * } * ``` * * @param dividend * The base value being divided. E.g. '1rem' or '--cnvs-sys-space-x1' * * @param divisor * The divisor of the base value. E.g. 2 or '--cnvs-sys-space-x1' * * @returns 'calc(dividend / divisor)' */ declare function divide(dividend: string, divisor?: string | number): string; /** * Function that negates the value of a CSS variable or value. * CSS vars will be automatically wrapped in `var()` if provided. * * ```ts * const styles = { * // returns 'calc(var(--cnvs-sys-space-x4) * -1)' * padding: negate('--cnvs-sys-space-x4'); * } * ``` * * @param value * The value being negated. E.g. '--cnvs-sys-space-x1' or '1rem' * * @param fallback * An optional fallback value for a CSS variable. E.g. '1rem' * * @returns 'calc(var(value) * -1)' */ declare function negate(value: string, fallback?: string): string; export declare const calc: { add: typeof add; divide: typeof divide; multiply: typeof multiply; negate: typeof negate; subtract: typeof subtract; }; export {}; //# sourceMappingURL=calc.d.ts.map