import type * as CSS from 'csstype';const style: CSS.Properties = { colour: 'white', // Type error on property textAlign: 'middle', // Type error on value};
Note: We are in the process of deprecating themdn/data package in favor of w3c/webref. If you depend on this project, let us know in our community GitHub discussions. Thank you.
I found the below information from the CSSType about the PropertiesHyphen:
Hyphen cased (kebab cased) properties are provided in CSS.PropertiesHyphen and CSS.PropertiesHyphenFallback. It's not not added by default in CSS.Properties. To allow both of them, you can simply extend with CSS.PropertiesHyphen or/and CSS.PropertiesHyphenFallback.
import type * as CSS from 'csstype';interface Style extends CSS.Properties, CSS.PropertiesHyphen {}const style: Style = { 'flex-grow': 1, 'flex-shrink': 0, 'font-weight': 'normal', backgroundColor: 'white',};
Hey, my name is Ramu Narasinga. I study large open-source projects and create content about their codebase architecture and best practices, sharing it through articles, videos.
Configure features such as Changesets, Supabase authentication in your Next.js project usingThink Throo CLI.