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

Adding support for browserslist #487

Closed
jalooc opened this issue Feb 12, 2017 · 2 comments
Closed

Adding support for browserslist #487

jalooc opened this issue Feb 12, 2017 · 2 comments

Comments

@jalooc
Copy link

jalooc commented Feb 12, 2017

A really nice feature that styled-components would benefit from is a support for browserslist. As it's widely used by big css-related packages (Autoprefixer, Stylelint etc.), it became a de-facto standard for defining the desired set of browsers to support. Without it, some of us would pointlessly ship loads of prefixes for properties/values necessary for older browsers than those that we would like to eventually support. Moreover, it would co-operate nicely with packages like babel-env-preset, forming a complex solution for specific browser targetted builds.

@mxstbr
Copy link
Member

mxstbr commented Feb 12, 2017

Without it, some of us would pointlessly ship loads of prefixes for properties/values necessary for older browsers than those that we would like to eventually support.

We apply all prefixes for all browsers support by React itself, not more and not less. (IE9+) Both modern and old browsers get the exact same minimal CSS, without any prefixes, and then get prefixed in the browser.

Neither loading time nor performance-wise does supporting browserlist make any sense, as it'll add a lot of package weight for everybody for a fringe use case of people only supporting a subset of the browsers React supports, who don't gain any benefit from actually applying that browserlist.

@mxstbr mxstbr closed this as completed Feb 12, 2017
@jalooc
Copy link
Author

jalooc commented Feb 12, 2017

Okay, that's a good point if the prefixing is done on the client side. Thanks for the quick answer.

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

No branches or pull requests

2 participants