Skip to content

Commit 08f27c1

Browse files
committed
All: Remove unused matchMedia.js, Respond.js, and Modernizr
* 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.
1 parent 05f7b85 commit 08f27c1

File tree

5 files changed

+3
-64
lines changed

5 files changed

+3
-64
lines changed

LICENSE.txt

-12
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,10 @@ differ from the terms above.
2222
https://github.com/scottgonzalez/grunt-wordpress
2323
located at plugins/gilded-wordpress.php
2424

25-
- matchMedia.js
26-
https://github.com/paulirish/matchMedia.js
27-
located at themes/jquery/js/plugins.js
28-
29-
- Modernizr
30-
https://modernizr.com/
31-
located at themes/jquery/js/modernizr.custom.2.8.3.min.js
32-
3325
- No Comments on Pages
3426
https://wordpress.org/plugins/no-comments-on-pages/
3527
located at plugins/no-comments-on-pages
3628

37-
- Respond.js
38-
https://github.com/scottjehl/Respond
39-
located at themes/jquery/js/plugins.js
40-
4129
- TinyNav.js
4230
http://tinynav.com/
4331
located at themes/jquery/js/plugins.js

themes/jquery/css/base.css

+1-30
Original file line numberDiff line numberDiff line change
@@ -1236,10 +1236,6 @@ iframe {
12361236
border-top-right-radius: 0;
12371237
}
12381238

1239-
.no-boxshadow #content-wrapper {
1240-
border: 1px solid #333;
1241-
}
1242-
12431239
.constrain {
12441240
max-width: 1240px;
12451241
margin: 0 auto;
@@ -1621,12 +1617,6 @@ nav#main {
16211617
background-color: rgba(102, 102, 102, 0.1);
16221618
}
16231619

1624-
.no-boxshadow nav#main {
1625-
border-top: 1px solid #333;
1626-
border-left: 1px solid #333;
1627-
border-right: 1px solid #333;
1628-
}
1629-
16301620
nav#main ul {
16311621
margin: 0;
16321622
float: left;
@@ -1689,15 +1679,6 @@ nav#main .searchform input:focus {
16891679
outline: none;
16901680
}
16911681

1692-
.no-boxshadow nav#main .searchform {
1693-
border: 1px solid #333;
1694-
}
1695-
1696-
.no-boxshadow nav#main .searchform input {
1697-
background: #fff;
1698-
color: #333;
1699-
}
1700-
17011682
nav#main .searchform input::placeholder {
17021683
color: #fff;
17031684
}
@@ -2215,6 +2196,7 @@ input[type="submit"].dark:hover {
22152196

22162197
footer {
22172198
background: url(../images/bg-footer-noise.jpg) repeat;
2199+
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;
22182200
margin-top: -20px;
22192201
padding-top: 40px;
22202202
}
@@ -2287,17 +2269,6 @@ footer .footer-icon-links li:hover a:before {
22872269
color: #d1d1d1;
22882270
}
22892271

2290-
.multiplebgs.cssgradients footer {
2291-
background-image: linear-gradient(to bottom, rgba(0,0,0,.3), rgba(0,0,0,0)), url(../images/bg-footer-noise.jpg);
2292-
background-repeat: repeat-x, repeat;
2293-
background-size: 100px 15px, 140px 140px;
2294-
}
2295-
2296-
.no-multiplebgs footer, .no-cssgradients footer {
2297-
background-image: url(../images/bg-footer-noise.jpg);
2298-
background-repeat: repeat;
2299-
}
2300-
23012272
footer h3 {
23022273
color: #777;
23032274
letter-spacing: normal;

themes/jquery/header.php

+2-10
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,26 @@
1515

1616
<meta name="author" content="JS Foundation - js.foundation">
1717
<meta name="description" content="<?php echo get_option( 'jquery_description', '' ); ?>">
18-
1918
<meta name="viewport" content="width=device-width">
2019

2120
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/i/favicon.ico">
22-
2321
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/base.css?v=4">
2422
<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>?v=2">
2523

26-
<script src="<?php echo get_template_directory_uri(); ?>/js/modernizr.custom.2.8.3.min.js"></script>
27-
2824
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
29-
3025
<script src="<?php echo get_template_directory_uri(); ?>/js/plugins.js"></script>
3126
<script src="<?php echo get_template_directory_uri(); ?>/js/main.js"></script>
32-
3327
<script src="https://use.typekit.net/wde1aof.js"></script>
3428
<script>try{Typekit.load();}catch(e){}</script>
35-
<!-- at the end of the HEAD -->
3629
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
3730
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/docsearch.css">
38-
3931
<?php
40-
if ( is_singular() && get_option( 'thread_comments' ) )
32+
if ( is_singular() && get_option( 'thread_comments' ) ) {
4133
wp_enqueue_script( 'comment-reply' );
34+
}
4235

4336
wp_head();
4437
?>
45-
4638
</head>
4739
<body <?php body_class(); ?>>
4840

themes/jquery/js/modernizr.custom.2.8.3.min.js

-4
This file was deleted.

themes/jquery/js/plugins.js

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)