tribou / react-template

Build a server-rendered React app and share code across web, React Native, and Electron
Apache License 2.0
4 stars 9 forks source link

Upgrade PreCSS vs other PostCSS options #72

Open tribou opened 6 years ago

tribou commented 6 years ago

It looks like the latest version of precss has had a major overhaul. Upgrading will require a change for how we import mixins and other settings. It's probably worth researching other options such as postcss-cssnext or styled-components.

However, right now our stack is extremely performance-optimized with no compromises on current CSS features + support for most SASS features. If we do switch, we need to double-check all the supported CSS features (especially media queries, classes vs inline styles, animations, etc.) and outline the benefits, compromises, and limitations.

tribou commented 6 years ago

http://css-blocks.com/ should be considered as well although it may not be stable yet. Still, its CSS performance optimizations are exactly inline with what this framework was made to target.

tribou commented 6 years ago

react-native-web has come a long way since I last reviewed it. There's a slight performance compromise and we would need to change the way we approach CSS-specifics like media queries and pseudo-elements/classes.

The benefit to potentially outweigh these downsides would be a more unified context to styling across React Native and React Web. However, this may be difficult to portray on paper versus being able to test in an example approach.