fable-compiler / fable-react

Fable bindings and helpers for React and React Native
MIT License
273 stars 67 forks source link

WIP: Missing hyphens for typed css props #181

Closed SCullman closed 4 years ago

SCullman commented 4 years ago

I noticed that WhiteSpace WhiteSpaceOptions.PreLine was not working. If there is not an option missing, Compiled Name has to be set for a lot of props.

alfonsogarciacaro commented 4 years ago

Ah, good one! I'm surprised we didn't catch this earlier :confused: I remember now we were talking about adding SnakeCase to the CaseRules options, but apparently I forgot to do it at the end 😅

You mean this change is needed in other options too? That's why the PR is WIP?

SCullman commented 4 years ago

You mean this change is needed in other options too?

Looks like the tip of an iceberg

That's why the PR is WIP?

I hoped for a kind of snake-case option, because on first sight it seemed that nearly any PascalCase word needs an hyphen.

Thank you for answering immediately. Tomorrow I will have a longer ride on a train, good chance to run through all props...

alfonsogarciacaro commented 4 years ago

Hmm, I think you're right, we should use this opportunity to implement SnakeCase in the CaseRules. This would mean users need to update the fable-compiler version which unfortunately there's no way to force at the moment from a library. But given the CSS rules are already broken, I guess the worst thing that can happen is users won't get the fix until they update fable-compiler.

SCullman commented 4 years ago

That would be great. There are more than 300 CSSProps. In checked about 50%. Either SnakeCase fits, or the props are unknown to Chrome :-). So I appreciate if you implement SnakeCase. In the mean time, may this state be merged as minor release? It would help in my project.

alfonsogarciacaro commented 4 years ago

Sure thing! Published as 5.3.3

SCullman commented 4 years ago

Whow, thanks!