-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Make auto-prefix util isomorphic #591
Conversation
Make auto-prefix util isomorphic
Thanks @troutowicz ! 👍 |
I'm guessing there's no workaround for differences between server and client side rendering as the sever-side won't know what it needs to prefix? @hai-cea @troutowicz |
@mozmorris The differences should not matter. Pre-render server side without prefixing, then prefix once on the client. |
Cool, I guess I was just thinking about the potential for FOUC. Could you see that being a problem? |
That's a good question :) |
Any update on this? I'm building an isomorphic app and having a similar problem with the
|
@davidshariff for this reason I couldn't continue with this set of components. The FOUC wasn't going to cut it. Hacks like hiding everything until the JS (and prefixed styles) had loaded defeated one purpose of rendering on the server. I think I prefer being able to extract my styles into a separate stylesheet and generate the critical path using a library like https://github.com/pocketjoso/penthouse. Perhaps that's sooo 2014. I'm still not decided about all this stuff anyway. |
@davidshariff I'm running into the same issue. After reading about CSS Modules yesterday, I'm wondering if they might fit in nicely for this problem. The diff prefixes might be pushed into the stylesheets, and the markup on the server and client would be able to match. |
Allow server side use of the auto-prefix util. Also check falseyness of the returned prefixed string in the
singleHyphened
method as theModernizr.prefixed
method seems to returnfalse
in some instances when using PhantomJS.