sfreytag / friday-theme

A Bootstrap 4 portfolio and blog theme for Jekyll
MIT License
69 stars 97 forks source link

Is the script for "IE10 viewport hack for Surface/desktop Windows 8 bug" in _layouts/default.html relevent in 2021? #14

Closed akc3n closed 3 years ago

akc3n commented 3 years ago

Hi,

I'm just wondering if this script, that's in the default.html file, is even relevent in 2021? If not, can it be removed? Should it be removed?

<script type="text/javascript">
/*!
 * IE10 viewport hack for Surface/desktop Windows 8 bug
 * Copyright 2014-2017 The Bootstrap Authors
 * Copyright 2014-2017 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */

// See the Getting Started docs for more information:
// https://getbootstrap.com/getting-started/#support-ie10-width

(function () {
    'use strict'

    if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
        var msViewportStyle = document.createElement('style')
        msViewportStyle.appendChild(
            document.createTextNode(
                '@-ms-viewport{width:auto!important}'
            )
        )
        document.head.appendChild(msViewportStyle)
    }
}())
</script>
sfreytag commented 3 years ago

Thanks for this, yes I agree... this is no longer in the Bootstrap 4.6 starter template. This would also be a good time to upgrade to Bootstrap 4.6, too, I will open a separate issue for that rather than tie them together.

akc3n commented 3 years ago

@sfreytag Thank you.