frenic / csstype

Strict TypeScript and Flow types for style based on MDN data
MIT License
1.73k stars 72 forks source link

Add generics to string properties #100

Open sjohnsonaz opened 4 years ago

sjohnsonaz commented 4 years ago

For properties like backgroundColor, and transform, they only accept string. Is it possible to create a generic for this, similar to TLength?

frenic commented 4 years ago

A generic for what purpose?

sjohnsonaz commented 4 years ago

I'm attempting to override the string value for backgroundColor and transform with another type. I'm hoping to pass an Object that has a toString method so that it will automatically cast to a correctly formatted string.

I did this already for properties using TLength, like margin, but the rest aren't generic.