JSPM

  • Created
  • Published
  • Downloads 66733765
  • Score
    100M100P100Q238995F
  • License MIT

TypeScript definitions for CSS

Package Exports

  • csstype

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (csstype) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CSSType

TypeScript definitions for CSS, generated by data from MDN. It provides autocompletion and type checking for CSS properties and values.

const style: CSS.Properties = {
  flexDirection: 'columns', // -> Type '"rows"' is not assignable to type 'FlexDirection'.
  opacity: '10%', // -> Type 'string' is not assignable to type 'number'.
  bakground: 'red', // -> Object literal may only specify known properties, and 'bakground' does not exist in type 'Properties'.
}

Getting started

$ npm install csstype@latest # For projects
$ npm install csstype@* # For libraries