use Modernizr to replace javascript mobile browser detection(#2730)

use Modernizr to detect if the device is touchable or not, therefore decide whether to use tablet friendly css styling. The reason of using this implementation over javascript if statement is that we don't need two css files for tablet and desktop, therefore minimize repetitive code.