shouldDegrade Example

This example shows how you can use enquire.js' shouldDegrade flag to deal with incapable legacy browsers.

shouldDegrade will cause any legacy browser that enquire.js deems to be incapable to have the match callback always be executed, regardless of whether the media query has actually matched. This allows you to follow a mobile-first approach whilst still delivering a desktop experience to legacy browsers. For this reason, this flag is typically set on queries targetting larger viewports.

As the media query is in this example is testing for huge viewports, it should never match on any modern browser, but because of the shouldDegrade flag, it will be considered a match on incapable browsers.