Inline styles module to use csstype for types
See original GitHub issueStyles typings are currently broken: https://github.com/snabbdom/snabbdom/pull/325
But I propose to make major improvement on this.
There are a good CSS props typings in typestyle
, so I propose two options:
- just take the code from typestyle and make own typings based on it (quite easy - almost copy-paste, no dependency, some additional maintenance needed to actualize typings when changed).
- use
typestyle
as dependency andimport {CSSProperties}
, but this lead to additional dependency (though only used for typing).
What would you say? @paldepind @staltz @mightyiam
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
@types/inline-css - npm
Start using @types/inline-css in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type ...
Read more >TypeScript and React: Styles and CSS - fettblog.eu
And all, really all typings have one thing in common: They rely on the csstype package. In this section: inline styles; emotion; Styled...
Read more >csstype/README.md at master - GitHub
Strict TypeScript and Flow types for style based on MDN data - csstype/README.md at master · frenic/csstype.
Read more >Types of CSS: Inline, Internal and External CSS Explained
For this CSS style, you'll only need to add the style attribute to each HTML tag, without using selectors. This CSS type is...
Read more >Type selectors - CSS: Cascading Style Sheets - MDN Web Docs
The CSS type selector matches elements by node name. ... documents containing multiple namespaces such as HTML with inline SVG or MathML, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @whitecolor, this is a good idea, but I’m going to suggest a third alternative:
@types/something-something
dedicated for CSS props typingsThen use that library in Snabbdom, as well as send a pull request to Typestyle so it can also depend on this new library.
https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/CSSStyleSheet