Signum Documentation

The documentation comes from the Markdown files in the source code, so is always up-to-date but available only in English. Enjoy!

Paste your Framework commit SHA


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

import * as CSS from 'csstype';

const style: CSS.Properties = {
  alignSelf: 'stretsh', // Type error on value
  colour: 'white', // Type error on property

Getting started

$ npm install csstype
$ # or
$ yarn add csstype

Table of content

Style types


CSS properties interface with camel cased property names:


  • StandardProperties
    • StandardLonghandProperties
    • StandardShorthandProperties
  • VendorProperties
    • VendorLonghandProperties
    • VendorShorthandProperties
  • SvgProperties


CSS properties interface with kebab cased property names:


  • StandardPropertiesHyphen
    • StandardLonghandPropertiesHyphen
    • StandardShorthandPropertiesHyphen
  • VendorPropertiesHyphen
    • VendorLonghandPropertiesHyphen
    • VendorShorthandPropertiesHyphen
  • SvgPropertiesHyphen


Equals to Properties but also allows array of values:


  • StandardPropertiesFallback
    • StandardLonghandPropertiesFallback
    • StandardShorthandPropertiesFallback
  • VendorPropertiesFallback
    • VendorLonghandPropertiesFallback
    • VendorShorthandPropertiesFallback
  • SvgPropertiesFallback


Equals to PropertiesHyphen but also allows array of values:


  • StandardPropertiesHyphenFallback
    • StandardLonghandPropertiesHyphenFallback
    • StandardShorthandPropertiesHyphenFallback
  • VendorPropertiesHyphenFallback
    • VendorLonghandPropertiesHyphenFallback
    • VendorShorthandPropertiesHyphenFallback
  • SvgPropertiesHyphenFallback

At-rule types

At-rule interfaces with descriptors.


  • CounterStyle
  • CounterStyleFallback
  • CounterStyleHyphen
  • CounterStyleHyphenFallback


  • FontFace
  • FontFaceFallback
  • FontFaceHyphen
  • FontFaceHyphenFallback


  • Page
  • PageFallback
  • PageHyphen
  • PageHyphenFallback


  • Viewport
  • ViewportFallback
  • ViewportHyphen
  • ViewportHyphenFallback

Pseudo types

String literals of pseudo classes and pseudo elements

  • Pseudos
    • AdvancedPseudos Function-like pseudos like :not(...)
    • SimplePseudos


Length unit defaults to string | 0 because 0 is the only unitless length. But it's possible to override it using generics.

import * as CSS from 'csstype';

const style: CSS.Properties<string | number> = {
  padding: 10,
  margin: '1rem',

In some cases, like for CSS-in-JS libraries, an array of values is a way to provide fallback values in CSS. Using CSS.PropertiesFallback instead of CSS.Properties will add the possibility to use any property value as an array of values.

import * as CSS from 'csstype';

const style: CSS.PropertiesFallback = {
  display: ['-webkit-flex', 'flex'],
  color: 'white',

There's even string literals for pseudo selectors and elements.

import * as CSS from 'csstype';

const pseudos: { [P in CSS.SimplePseudos]?: CSS.Properties } = {
  ':hover': {
    display: 'flex',

Hyphen cased (kebab cased) properties are provided in CSS.PropertiesHyphen and CSS.PropertiesHyphenFallback. It's not not added by default in CSS.Properties. To allow both of them, you can simply extend with CSS.PropertiesHyphen or/and CSS.PropertiesHyphenFallback.

import * as CSS from 'csstype';

interface Style extends CSS.Properties, CSS.PropertiesHyphen {}

const style: Style = {
  'flex-grow': 1,
  'flex-shrink': 0,
  'font-weight': 'normal',
  backgroundColor: 'white',

Version 2.0

The casing of CSS vendor properties are changed matching the casing of prefixes in Javascript. So all of them are capitalized except for ms.

  • msOverflowStyle is still msOverflowStyle
  • mozAppearance is now MozAppearance
  • webkitOverflowScrolling is now WebkitOverflowScrolling

More info: