Skip to content

Commit

Permalink
Remove Modernizr integration
Browse files Browse the repository at this point in the history
Modernizr is a feature-detection library that has been a part of this
project for around ten years. Using its CSS classes, this project was
detecting the following browser features:

- Border Radius: https://caniuse.com/border-radius
- Box Shadow: https://caniuse.com/css-boxshadow
- CSS Animations: https://caniuse.com/css-animation
- SVG: https://caniuse.com/svg

Each of these features has been available in modern browsers for many
years, so we no longer need Modernizr.

This patch does the following:

- Removes `modernizr.js`
- Removes PNG logos that were fallbacks for SVG logos
- Refactors SCSS that was pivoting on Modernizr CSS classes (`mdzr-*`)
  • Loading branch information
adamzap authored and bmispelon committed Nov 30, 2024
1 parent e6987d1 commit 132af0b
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 175 deletions.
244 changes: 74 additions & 170 deletions djangoproject/scss/_style.scss

Large diffs are not rendered by default.

Binary file removed djangoproject/static/img/logo-andrevv.png
Binary file not shown.
Binary file removed djangoproject/static/img/logo-disqus.png
Binary file not shown.
Binary file removed djangoproject/static/img/logo-django.png
Binary file not shown.
Binary file removed djangoproject/static/img/logo-knight.png
Binary file not shown.
Binary file removed djangoproject/static/img/logo-mozilla.png
Binary file not shown.
Binary file removed djangoproject/static/img/logo-threespot.png
Binary file not shown.
4 changes: 0 additions & 4 deletions djangoproject/static/js/lib/modernizr.js

This file was deleted.

1 change: 0 additions & 1 deletion djangoproject/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
timeout: 1000
});
</script>
<script src="{% static "js/lib/modernizr.js" %}"></script>
<script src="{% static "js/mod/switch-dark-mode.js" %}"></script>
{% block head_extra %}{% endblock head_extra %}
</head>
Expand Down

0 comments on commit 132af0b

Please sign in to comment.