Make WordPress Core

Changeset 60960


Ignore:
Timestamp:
10/17/2025 08:57:48 PM (3 months ago)
Author:
joedolson
Message:

Twenty Eleven: Remove code and checks for obsolete browsers.

Remove IE specific code from Twenty Eleven. Remove custom IE stylesheet contents, the HTML5 shiv contents (also targeting Safari 4.x and Firefox 3.x), and IE-specific code.

Props desrosj, sabernhardt, karmatosed, neychok, metodiew, mukesh27, aristath, joedolson.
See #58836.

Location:
trunk/src/wp-content/themes/twentyeleven
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/colors/dark.css

    r58290 r60960  
    320320    background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Chrome10+,Safari5.1+ */
    321321    background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Opera11.10+ */
    322     background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* IE10+ */
    323     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
    324322    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* W3C */
    325323}
  • trunk/src/wp-content/themes/twentyeleven/editor-style.css

    r58816 r60960  
    232232
    233233/* Images */
    234 img.size-full {
    235     width: auto; /* Prevent stretching of full-size images in IE8 */
    236 }
    237234img.wp-smiley {
    238235    border: none;
  • trunk/src/wp-content/themes/twentyeleven/header.php

    r60483 r60960  
    1010 */
    1111?><!DOCTYPE html>
    12 <!--[if IE 6]>
    13 <html id="ie6" <?php language_attributes(); ?>>
    14 <![endif]-->
    15 <!--[if IE 7]>
    16 <html id="ie7" <?php language_attributes(); ?>>
    17 <![endif]-->
    18 <!--[if IE 8]>
    19 <html id="ie8" <?php language_attributes(); ?>>
    20 <![endif]-->
    21 <!--[if !(IE 6) & !(IE 7) & !(IE 8)]><!-->
    2212<html <?php language_attributes(); ?>>
    23 <!--<![endif]-->
    2413<head>
    2514<meta charset="<?php bloginfo( 'charset' ); ?>" />
     
    5241<link rel="stylesheet" type="text/css" media="all" href="<?php echo esc_url( get_stylesheet_uri() ); ?>?ver=20250415" />
    5342<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
    54 <!--[if lt IE 9]>
    55 <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js?ver=3.7.0" type="text/javascript"></script>
    56 <![endif]-->
    5743<?php
    5844    /*
  • trunk/src/wp-content/themes/twentyeleven/js/html5.js

    r27263 r60960  
    1 /*
    2  HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
    3 */
    4 (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
    5 a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
    6 c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
    7 "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
    8 if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
     1// This theme does not support Internet Explorer since version 5.0.
  • trunk/src/wp-content/themes/twentyeleven/readme.txt

    r60159 r60960  
    3939Twenty Eleven Theme bundles the following third-party resources:
    4040
    41 HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas
    42 Licenses: MIT/GPL2
    43 Source: https://github.com/aFarkas/html5shiv
    44 
    4541Images
    4642"Yellow Flower Photo" by Bernard Spragg. CC0. https://stocksnap.io/photo/yellow-flower-GWT9JVALSV
  • trunk/src/wp-content/themes/twentyeleven/rtl.css

    r59226 r60960  
    572572    }
    573573}
    574 
    575 /* =IE7
    576 ----------------------------------------------- */
    577 
    578 #ie7 section.recent-posts {
    579     margin-right: 0;
    580     margin-left: 7.6%;
    581 }
  • trunk/src/wp-content/themes/twentyeleven/style.css

    r60159 r60960  
    899899img.size-large {
    900900    max-width: 97.5%;
    901     width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */
    902901    height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */
    903902}
     
    15871586    background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* Chrome10+,Safari5.1+ */
    15881587    background: -o-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* Opera11.10+ */
    1589     background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* IE10+ */
    1590     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */
    15911588    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* W3C */
    15921589    width: 100%;
     
    27942791    }
    27952792}
    2796 
    2797 
    2798 /* =IE7
    2799 ----------------------------------------------- */
    2800 
    2801 #ie7 article.intro {
    2802     margin-left: -7.6%;
    2803     margin-right: -7.6%;
    2804     max-width: 1000px;
    2805 }
    2806 #ie7 .featured-posts {
    2807     margin: 0 -7.6%;
    2808 }
    2809 #ie7 .featured-post {
    2810     margin-left: 0;
    2811     margin-right: 0;
    2812     max-width: 100%;
    2813 }
    2814 #ie7 section.recent-posts {
    2815     margin-right: 7.6%;
    2816 }
    2817 
    2818 
    2819 /* =IE8
    2820 ----------------------------------------------- */
    2821 
    2822 #ie8 section.feature-image.large img {
    2823     width: auto;
    2824 }
    2825 #ie8 section.featured-post .attachment-small-feature {
    2826     max-width: none;
    2827 }
Note: See TracChangeset for help on using the changeset viewer.