Skip to content

Commit

Permalink
All: Remove unused matchMedia.js, Respond.js, and Modernizr
Browse files Browse the repository at this point in the history
* Respond.js existed as fallback for IE6-IE8, which is no longer
  supported among developer audiences, and would have likely degraded
  fairly well without it as well.
  https://github.com/scottjehl/Respond

* matchMedia.js only used by matchMedia.js.

* Modernizr used for three classes on the `<html>` element:
  boxshadow, multiplebgs, cssgradients. These are common in all
  supported browsers, and similarly, degrade well without it.

  For the gradient and multiple bg style, keep a fallback as proof
  of concept that this doesn't require any JS even in old browsers.
  CSS naturally falls back to the previous declaration if it doesn't
  support the value syntax.
  • Loading branch information
Krinkle committed Sep 18, 2023
1 parent 05f7b85 commit 08f27c1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 64 deletions.
12 changes: 0 additions & 12 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,10 @@ differ from the terms above.
https://github.com/scottgonzalez/grunt-wordpress
located at plugins/gilded-wordpress.php

- matchMedia.js
https://github.com/paulirish/matchMedia.js
located at themes/jquery/js/plugins.js

- Modernizr
https://modernizr.com/
located at themes/jquery/js/modernizr.custom.2.8.3.min.js

- No Comments on Pages
https://wordpress.org/plugins/no-comments-on-pages/
located at plugins/no-comments-on-pages

- Respond.js
https://github.com/scottjehl/Respond
located at themes/jquery/js/plugins.js

- TinyNav.js
http://tinynav.com/
located at themes/jquery/js/plugins.js
Expand Down
31 changes: 1 addition & 30 deletions themes/jquery/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1236,10 +1236,6 @@ iframe {
border-top-right-radius: 0;
}

.no-boxshadow #content-wrapper {
border: 1px solid #333;
}

.constrain {
max-width: 1240px;
margin: 0 auto;
Expand Down Expand Up @@ -1621,12 +1617,6 @@ nav#main {
background-color: rgba(102, 102, 102, 0.1);
}

.no-boxshadow nav#main {
border-top: 1px solid #333;
border-left: 1px solid #333;
border-right: 1px solid #333;
}

nav#main ul {
margin: 0;
float: left;
Expand Down Expand Up @@ -1689,15 +1679,6 @@ nav#main .searchform input:focus {
outline: none;
}

.no-boxshadow nav#main .searchform {
border: 1px solid #333;
}

.no-boxshadow nav#main .searchform input {
background: #fff;
color: #333;
}

nav#main .searchform input::placeholder {
color: #fff;
}
Expand Down Expand Up @@ -2215,6 +2196,7 @@ input[type="submit"].dark:hover {

footer {
background: url(../images/bg-footer-noise.jpg) repeat;
background: linear-gradient(to bottom, rgba(0,0,0,.3), rgba(0,0,0,0)) top left / 100px 15px repeat-x, url(../images/bg-footer-noise.jpg) repeat;
margin-top: -20px;
padding-top: 40px;
}
Expand Down Expand Up @@ -2287,17 +2269,6 @@ footer .footer-icon-links li:hover a:before {
color: #d1d1d1;
}

.multiplebgs.cssgradients footer {
background-image: linear-gradient(to bottom, rgba(0,0,0,.3), rgba(0,0,0,0)), url(../images/bg-footer-noise.jpg);
background-repeat: repeat-x, repeat;
background-size: 100px 15px, 140px 140px;
}

.no-multiplebgs footer, .no-cssgradients footer {
background-image: url(../images/bg-footer-noise.jpg);
background-repeat: repeat;
}

footer h3 {
color: #777;
letter-spacing: normal;
Expand Down
12 changes: 2 additions & 10 deletions themes/jquery/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,26 @@

<meta name="author" content="JS Foundation - js.foundation">
<meta name="description" content="<?php echo get_option( 'jquery_description', '' ); ?>">

<meta name="viewport" content="width=device-width">

<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/i/favicon.ico">

<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/base.css?v=4">
<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>?v=2">

<script src="<?php echo get_template_directory_uri(); ?>/js/modernizr.custom.2.8.3.min.js"></script>

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>

<script src="<?php echo get_template_directory_uri(); ?>/js/plugins.js"></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/main.js"></script>

<script src="https://use.typekit.net/wde1aof.js"></script>
<script>try{Typekit.load();}catch(e){}</script>
<!-- at the end of the HEAD -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/docsearch.css">

<?php
if ( is_singular() && get_option( 'thread_comments' ) )
if ( is_singular() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}

wp_head();
?>

</head>
<body <?php body_class(); ?>>

Expand Down
4 changes: 0 additions & 4 deletions themes/jquery/js/modernizr.custom.2.8.3.min.js

This file was deleted.

8 changes: 0 additions & 8 deletions themes/jquery/js/plugins.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 08f27c1

Please sign in to comment.