How do you type that? I mean, for the above you could go with Px, but what if some of the records use em or unitless instead? Is there a more general type?
Yeah, me neither. Length requires two parameters. The first one can be plugged by Css.Compatible, though I won’t pretend I understand what it does As for the second one, I have no idea what to put there.
You seem to be able to use FontSize a and LengthOrNumber b. I found these by looking at the type annotations for the fontSize and lineHeight functions. Here’s an example: https://ellie-app.com/8Nd6qrjPTNba1
It’s not even that I missed LengthOrNumber, it’s just that I didn’t think you can provide an abstract parameter in a signature (LengthOrNumber b in your example). I thought it has to be some specific type.