In order to embrace modern web technologies we need to be able to provide fall backs for older browsers.
#1261002: Draggable tables do not work on touch screen devices
#1260800: Kill the overlay for widths below 640 pixels
#1170478: Responsive Images
#1137800: Increase minimum size of targets for touch screens
#1277352: Responsive vertical tabs
#1192068: Graceful degradation for browsers that don't support media queries
#1512194: Use HTML5 datalists for autocomplete
#1168246: Freedom For Fieldsets! Long Live The DETAILS.
#1137920: Fix toolbar on small screen sizes and redesign toolbar for desktop
Right now in D7 all feature detection is hard-coded in specific JS files. Proposed resolution
Include Modernizr in core. What parts of Modernizr we choose to include is important. If we go too lightweight then we run the risk of hitting a brick wall because of inability to predict use cases. If we go too heavy then it adds way too much redundant overhead to page loads.
The proposal is to modularise Modernizr within Drupal. Recreating the functionality of the Modernizr production builder
If we want to fully embrace HTML5 and Responsive Design in Drupal 8 then we need Modernizr in core.
Modules and themes would be able to call hook_device_context() in order to load the specific parts of Modernizr that they require.
Original report by bayousoft