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

How do you specify which prefixes you want #363

Closed
seancurtis opened this issue Jan 10, 2017 · 5 comments
Closed

How do you specify which prefixes you want #363

seancurtis opened this issue Jan 10, 2017 · 5 comments

Comments

@seancurtis
Copy link

I noticed a heap of -webkit-calc() and -moz-calc() prefixed rules in the CSS output for my component. Why is it outputting unnecessary styles? I couldn't find any docs on how to specify the browsers that need to be supported.

@mxstbr
Copy link
Member

mxstbr commented Jan 11, 2017

See #111.

Instead of shipping a 1MB file for every request, we decided to just prefix all the things. Since the "unnecessary" styles are only generated and not sent down the wire, that doesn't really hurt anybody.

@mxstbr mxstbr closed this as completed Jan 11, 2017
@seancurtis
Copy link
Author

Can you make it so the prefixed rules appear before the un-prefixed ones at least? See Khan/aphrodite#100 and https://css-tricks.com/ordering-css3-properties/ for more info on that.

@geelen
Copy link
Member

geelen commented Jan 11, 2017

That's already been fixed (test here) and will ship with v2 quite soon

@jamesryan-dev
Copy link

so does simply using styled-components auto-prefix the styles or is this something I need to install?

@kitten
Copy link
Member

kitten commented Jul 11, 2017

@jimmynames It's taken care for you automatically: https://www.styled-components.com/docs/basics#getting-started

NOTE: The CSS rules are automatically vendor prefixed, so you don't have to think about it.

Please don't comment on old PRs and instead read the docs, or feel free to ask questions in new GH issues, on spectrum, or on Gitter ;) Otherwise we won't have any idea of how many people have asked a certain question, and won't notice whether the docs will need clarification 😉

@styled-components styled-components locked and limited conversation to collaborators Jul 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants