question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inline styles module to use csstype for types

See original GitHub issue

Styles 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:

  1. 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).
  2. use typestyle as dependency and import {CSSProperties}, but this lead to additional dependency (though only used for typing).

What would you say? @paldepind @staltz @mightyiam

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
staltzcommented, Oct 24, 2017

Hey @whitecolor, this is a good idea, but I’m going to suggest a third alternative:

  1. Publish a library @types/something-something dedicated for CSS props typings

Then use that library in Snabbdom, as well as send a pull request to Typestyle so it can also depend on this new library.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found