Skip to content

Instantly share code, notes, and snippets.

@iamstarkov
Created May 12, 2017 16:49
Show Gist options
  • Save iamstarkov/cf505391254bdb433eba3a7b752a9026 to your computer and use it in GitHub Desktop.
Save iamstarkov/cf505391254bdb433eba3a7b752a9026 to your computer and use it in GitHub Desktop.
type BorderStyle = oneOf(['solid', 'dotted', … ])
type Unit = oneOf([ 'px', 'em', 'rem', … ])
type Width = oneOfType([
type Number,
`${type Number}{type Unit}`
])
type BorderWidth = inherits Width;
type Color = oneOfType([
type ColorHex,
type ColorName,
type ColorRgba,
]);
type BorderColor = inherits Color;
type Border = `${type BorderWidth} ${type BorderStyle} ${type BorderColor}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment