Closed pjebs closed 5 years ago
Best thing to do here would be to either submit a PR with the additional attributes you require (modifying the "template") or list them here.
We could add an escape hatch, but to be honest doing the "right" thing of adding the attributes explicitly seems better. Particularly as I intend to make these more type-safe.
But open to thoughts/opinions on that stance.
Obviously it would be better of all possibilities were covered in a type-safe manner. I just don't think that's practical though. I think providing an escape hatch is the perfect balance. You can always add more attributes if you want for type-safety. See: https://reactjs.org/docs/dom-elements.html#style You can see Facebook doesn't even attempt to cover all possibilities like they do for attributes where they provide a list.
Fair point; I'd be happy reviewing a PR so we can see how it looks/feels in practice.
I can add some items as I use them.
Looks useful: https://meiert.com/en/indices/css-properties/
Do I support CSS 3 only? Also is there a ways to set the "initial value" (prob might make the generated js too large)?
Do I support CSS 3 only?
Yes please. And I'd work from the spec where possible; it's the definitive reference.
Here is my pull request: https://github.com/myitcv/x/pull/71
Closing because I created my own bindings: https://github.com/rocketlaunchr/react/
@pjebs my apologies, I simply haven't had the time to get round to your various issues and PRs.
All the best with your bindings!
Thank you @myitcv. Your package was an inspiration for my own bindings.
It would be nice if there was an escape hatch for the
CSS
struct which contains a map. The map would allow us to add custom CSS attributes because it is currently very limiting.