• A TypeScript implementation of CSS.supports(), which provides intellisense (autocomplete suggestions) and validation for CSS property names and CSS property values.

    Example

    import { cssSupports } from '@neoncitylights/typed-css-utils';

    const supportsGrid = cssSupports('display', 'grid');
    const supportsFlex = cssSupports('display', 'flex');

    Note

    Global browser support is at 98.79% as of November 2022, and therefore stable to use.

    Chrome Edge Safari Firefox Opera
    61 79 9 55 15

    See

    Type Parameters

    • K extends keyof PropertiesHyphen<0 | string & {}, string & {}>

    Parameters

    • property: K
    • value: Required<PropertiesHyphen<0 | string & {}, string & {}>[K]>

    Returns boolean

Generated using TypeDoc