typestyle / typestyle

Making CSS Typesafe 🌹

Home Page:https://typestyle.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add fontWeight types

satvikpendem opened this issue · comments

Looks like the only options available for fontWeight are those in this image. This means I can't set it to medium, light, semibold, or others, as well as not being able to specify these weights as between 100 and 900. Is there a way around this? I can add these types in a PR if needed, just let me know where to add them.

Also, I've noticed insufficient types for other CSS properties as well, I can help on working to fix them.

image

Hey @satvikpendem I think you could get around this by updating TypeStyle's csstype to the latest version as it definitely has number in the types for font-weight (https://raw.githubusercontent.com/frenic/csstype/master/index.d.ts, ctrl+f for 'FontWeightAbsolute').

And ideally we'd update the dependency directly in TypeStyle for these fixes.

Thanks, how would I update csstype, just yarn upgrade csstype?

I'm not 100% sure, but I think you do yarn csstype to add it to your dependencies. Your suggestion may work as well, I'm less familiar with yarn these days.

I'd try them both out and report back how you make out.