WordPress.org

Make WordPress Core

Ticket #38395: 38395.patch

File 38395.patch, 2.4 KB (added by laurelfulford, 3 years ago)
  • src/wp-content/themes/twentyseventeen/assets/js/global.js

     
    139139                return 'http://www.w3.org/2000/svg' === ( 'undefined' !== typeof SVGRect && div.firstChild && div.firstChild.namespaceURI );
    140140        }
    141141
     142        /**
     143         * Test if an iOS device.
     144         */
     145        function checkiOS() {
     146                return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
     147        }
     148
    142149        // Fires on document ready
    143150        $( document ).ready( function() {
    144151
     
    168175
    169176                adjustHeaderHeight();
    170177                setQuotesIcon();
     178                checkiOS();
     179                if ( true === checkiOS() ) {
     180                        document.documentElement.className = document.documentElement.className.replace( /(\s*)no-ios(\s*)/, '$1ios$2' );
     181                }
    171182                supportsInlineSVG();
    172183                if ( true === supportsInlineSVG() ) {
    173184                        document.documentElement.className = document.documentElement.className.replace( /(\s*)no-svg(\s*)/, '$1svg$2' );
  • src/wp-content/themes/twentyseventeen/header.php

     
    1313 */
    1414
    1515?><!DOCTYPE html>
    16 <html <?php language_attributes(); ?> class="no-js no-svg">
     16<html <?php language_attributes(); ?> class="no-js no-svg no-ios">
    1717<head>
    1818<meta charset="<?php bloginfo( 'charset' ); ?>">
    1919<meta name="viewport" content="width=device-width, initial-scale=1">
  • src/wp-content/themes/twentyseventeen/style.css

     
    39033903
    39043904@media screen and ( min-width: 55em ) {
    39053905
    3906         .twentyseventeen-front-page.has-header-image .custom-header-image,
    3907         .home.blog.has-header-image .custom-header-image {
     3906        /* Only apply background-attachment: fixed when not on an iOS device. */
     3907        .not-ios .twentyseventeen-front-page.has-header-image .custom-header-image,
     3908        .not-ios .home.blog.has-header-image .custom-header-image,
     3909        .not-ios .panel-image {
    39083910                background-attachment: fixed;
    39093911        }
    3910 
    3911         .panel-image {
    3912                 background-attachment: fixed;
    3913         }
    39143912}
    39153913
    39163914@media screen and ( min-width: 67em ) {