tailwindcss-capsize
Version:
TailwindCSS leading-trim utility classes.
25 lines (24 loc) • 1.17 kB
TypeScript
type FontSizeValue = [string, Record<'lineHeight', string>];
export declare function isRelativeValue(value: string): boolean;
export declare function getRelativeValue(value: string): number;
export declare function normalizeValue(value: string | FontSizeValue, root: number, fs?: number): number;
export declare function getValueAndUnit(value: string): [number, string | undefined];
export declare function isPlainObject(value: unknown): boolean;
type ThemeValue = string | string[] | ((p?: any) => string);
/**
* Returns a value based on the core theme section. Adapted from Tailwind
* internals.
* @see https://github.com/tailwindlabs/tailwindcss/blob/30ea5b14a631b6f68e56740c3d09bb54fcbad08a/src/util/transformThemeValue.js
*/
export declare function normalizeThemeValue(key: string, value: ThemeValue): string | string[];
export declare function round(value: number): string;
/**
* Takes a theme value for lineHeight and returns the `--line-height-offset`
* custom property.
*/
export declare function lineHeightProperties(lineHeight?: string, rootSize?: number): {
'--line-height-offset'?: undefined;
} | {
'--line-height-offset': string;
};
export {};