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 trialNaomi Freier
3,627 Points-webkit-font-smoothing
what is the -webkit-font-smoothing property exactly? can you use it on all fonts, or only @font-face fonts? what does it mean when there's a hyphen before a property?
1 Answer
Erik McClintock
45,783 PointsNaomi,
Font-smoothing is a property that aims to help with anti-aliasing (i.e. removing jagged appearances, or "smoothing") of fonts rendered in the browser. For a little more information on that property, see these two pages:
1) MDN
As far as having a hyphen before a property: these are what's known as vendor prefixes for certain browsers, such as -webkit (for Chrome and Safari), -moz (for Firefox), and -ms (for Microsoft).
In short, vendor prefixes are used to help different browsers render newer, still-in-testing CSS features in their individual ways, since each browser implements things as they choose.
Erik
Naomi Freier
3,627 PointsNaomi Freier
3,627 Pointsthanks!
Erik McClintock
45,783 PointsErik McClintock
45,783 PointsMy pleasure! Happy coding :)
Erik
Naomi Freier
3,627 PointsNaomi Freier
3,627 Pointsso if you put -webkit before the property, and you don't put any other prefixes, then IE and firefox will ignore it? Why didn't Guil make this property work for all browsers?
Erik McClintock
45,783 PointsErik McClintock
45,783 PointsNaomi,
I haven't watched this series for quite some time now, so I'm not sure why he only added the -webkit prefix, but we can tag Guil Hernandez and hopefully he can shed some more light on the reasons why :)
Erik