Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Foundations CSS Gradients Linear Gradients

Juan Jimenez
Juan Jimenez
11,245 Points

Could it be that prefixes are no longer necessary?

http://caniuse.com/#search=gradients

According to can I use, -webkit is only required now for old versions of Safari, Android Browser.

More than 90% of global users seem to have compatible non-vendor-prefix browsers for gradients

Is it ok not to use them then?

5 Answers

Yes - unless there's a challenge that requires that prefix, but for development and production code, if you don't need it, don't add it. Consider using Autoprefixer or something similar, that way you never have to worry about prefixes again.

Juan Jimenez
Juan Jimenez
11,245 Points

That's what I guessed. I didn't know about Autoprefixer. That's really helpful. Thanks!

Christian Solorzano
Christian Solorzano
6,606 Points

Some prefixes are still necessary. I'm looking forward to the day that flexbox becomes a web standard.

Juan Jimenez
Juan Jimenez
11,245 Points

I just used Autoprefixer with Compass for the first time. That's an amazing tool. Thanks a lot Robert Richey!!! :)

Not only does it add vendor prefixes when needed, it also removes those that are not necessary according to caniuse.com

And in the case I was referring to (box-shadow) it removes vendor prefixes if used, so not needed at all.