npm.io
1.4.5 • Published 2 years ago

@types/compass-vertical-rhythm

Licence
MIT
Version
1.4.5
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/compass-vertical-rhythm

Summary

This package contains type definitions for compass-vertical-rhythm (https://github.com/KyleAMathews/compass-vertical-rhythm).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/compass-vertical-rhythm.

index.d.ts

export = compassVerticalRhythm;

declare namespace compassVerticalRhythm {
    interface Options {
        baseFontSize?: string | undefined;
        baseLineHeight?: number | string | undefined;
        rhythmUnit?: "%" | "em" | "ex" | "ch" | "px" | "rem" | "vw" | "vh" | "vmin" | undefined;
        defaultRhythmBorderWidth?: string | undefined;
        defaultRhythmBorderStyle?:
            | "solid"
            | "none"
            | "hidden"
            | "dashed"
            | "dotted"
            | "double"
            | "groove"
            | "ridge"
            | "inset"
            | "outset"
            | undefined;
        roundToNearestHalfLine?: boolean | undefined;
        minLinePadding?: string | undefined;
    }

    interface VerticalRhythmStyles {
        fontSize: string;
        lineHeight: string;
    }

    interface VerticalRhythm {
        rhythm(lines?: number, fontSize?: string, offset?: number): number;
        establishBaseline(): VerticalRhythmStyles;
        linesForFontSize(fontSize: string): number;
        adjustFontSizeTo(toSize: string, lines?: number | "auto" | null, fromSize?: string): VerticalRhythmStyles;
    }
}

declare function compassVerticalRhythm(
    options: compassVerticalRhythm.Options,
): compassVerticalRhythm.VerticalRhythm;

Additional Details

  • Last updated: Mon, 06 Nov 2023 2205 GMT
  • Dependencies: none

Credits

These definitions were written by Luis Rodrigues.