Skip to content

base.html: Drop dependency on modernizr.js library

Sunil Mohan Adapa requested to merge sunilmohan/freedombox:drop-modernizr into master
  • The library performs a large number of tests to determine if various features are available in the browser. In Debian most tests seem to be present unlike other methods of distribution where users select which tests they want and build a customized library for their app. This leads to increased page load time.

  • The only functionality we use from Modernizr library are the .js and .no-js classes we use in our CSS styling. Modernizr is not needed by Bootstrap library. We don't use 'Modernizr.' properties in Javascript.

  • A bug in on the test to determine if an element with type="number" allows localization or not causes the page to scroll down to the end. This behavior appeared in version 3.x of modernizr and despite the bug report and the fix, it is not gone. Dropping modernizr fixes this issue.

Tests:

  • The logout link in the header bar is visible only when Javascript is disabled.

  • The dropdown icons next to header menus only appear when Javascript is enabled.

  • For each feature detection provided by Modernizr library, search if our project is using that in CSS styling.

Signed-off-by: Sunil Mohan Adapa sunil@medhas.org

Merge request reports

Loading