Open boris-petrov opened 6 months ago
Maybe we should revisit #109 and convert the value to a string explicitly?
The arguments you've given there are pretty compelling and I agree with them. But there are a few properties which are exceptional - scale
for example - which don't require a unit. Perhaps only they could be made to work with other value types as well as strings. That would be best of both worlds - the types will be correct and the usability would be best for users - they could use numbers as well.
This compiles fine (as
PropertiesHyphen
fromcsstype
allows it) but at runtime it breaks. Not that big of an issue but would be nice to somehow fix. Not sure how though. Perhaps the best way would be to make thestyle
modifier work with other values not juststring
. Not sure why it was done so. Otherwise the types fromcsstype
should somehow be augmented which probably won't be simple and will be brittle.