Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support un-'px'ed styles #30

Open
charliermarsh opened this issue Aug 12, 2014 · 2 comments
Open

Support un-'px'ed styles #30

charliermarsh opened this issue Aug 12, 2014 · 2 comments

Comments

@charliermarsh
Copy link
Collaborator

We should support the same CSS style objects as React. For example, we should allow for { width: 10} to be a valid style object.

In general, why don't we utilize CSSPropertyOperations.createMarkupForStyles to generate a string of CSS? We could call it after checking for pseudo-selectors and media queries, and performing whatever pre-processing we want to support. I've already implemented this and can merge it in, if you agree.

@charliermarsh
Copy link
Collaborator Author

The downsides of this approach:

  1. React becomes an explicit dependency.
  2. In order to use createMarkupForStyles, we actually need to require deep into the React source (semi-bad practice).

I'm not terribly concerned about (1) given that 99.9% of RCSS users will be using it with React anyway, but as an alternative, we could carve out the few files we need and start maintaining our own copies. Anyway, I still opt for using createMarkupForStyles as it'll keep us in-sync with React going forward.

@Raynos
Copy link
Collaborator

Raynos commented Aug 13, 2014

given that 99.9% of RCSS users will be using it with React

We are thinking of using RCSS with mercury at Uber. One of the projects that we have in mind is to publish a modular version of something like bootstrap build from the ground up in RCSS & virtual-dom.

I've done a bunch of experiments to see what's really needed to do this performantly with server side rendering, if you couple it to react it would be harder for us to collaborate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants