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

Frances Parkin
Frances Parkin
7,760 Points

css3

I really want to use css3 because I love the functionality.

When you go to the MDN site and it says - don't use this as it is too early (blah blah blah)....

What techniques exist to test whether a browser is running the correct technology or not? (ie in sass @if css3==supported { do this }@else { do this }

Does such a feature exist? I tried googling but struggled to find answers

What suggestions does anyone have about how to cope with backward browser compatibility whilst still pushing forward with cutting edge css!!!

Frances Parkin
Frances Parkin
7,760 Points

maybe it should be something more like

@if css-masking==supported { do this }

because checking for css3 might not go far enough

http://modernizr.com/

Something like that is probably what you're looking for. It can help you detect if something will work in the browser and if it doesn't it looks like it adds some extra classes to those elements which you can then style however you want for browsers that don't use those CSS features.

2 Answers

Another useful place to check is caniuse.com . You can check CSS, HTML, JS and lots of other things.

Frances Parkin
Frances Parkin
7,760 Points

Thanks guys - I have used both modernizr and caniuse in videos but wasn't fully aware of the power of modernzr. Thanks