Description
Development on Radium has stalled lately. The timing of this is unfortunate because there are several large bugs in the project that need to be dealt with soon. I have some thoughts about what our next steps should be to get those resolved and make Radium more robust going forward.
The Problems
There are two primary issues with Radium at the moment, in my opinion.
Vendor Prefixing/Fallback Values
React 15 broke the (admittedly hacky) behavior we were relying on to provide vendor prefixes and fallback values in inline styles. This is very bad. For discussion of this issue, see #602. The React team is aware of the issue and there is a WIP PR to resolve it (https://github.com/facebook/react/pull/6701), but it's not clear if it's going to land and I don't think we should count on it.
Pseudo-Classes Are Hard
Right now, we emulate the CSS pseudo-classes :hover, :focus, and :active. Unfortunately for us, there are a whole slew of bugs (both now and in the past) related to this behavior, because there are a lot of edge cases around these behaviors.
The Solution
Both of these issues would be resolved by generating CSS in a style tag using the addCSS behavior that we use for media queries. For discussion of this idea, see #510. Moving in this direction (as Aphrodite has done, as a good example) would mean that all of the issues with both inline styles themselves (like fallback values) and emulating browser behavior would go away. It would also mean that any pseudo-elements/classes/selectors would work. This would remove a lot of behavior that Radium emulates now, and would be extremely flexible.
This would be a breaking change as some APIs, like getState, would go away completely. Other than that, my hope is that Radium would largely work as it does now, as the API is very good. The only real change would be the way that styles are applied.
Known Issues
One thing that is likely to hold us back here is the ongoing issue with media query class names and unique-ness. See #635. This is something that we would need to handle (and that we need to deal with as soon as possible anyway, because it's a major bug in its own right) before we could ship with even more generated CSS.
Thoughts?
I would love to hear any thoughts on this idea. I believe it's the right way to go, but want to hear from the community.