iOS optimizations

This commit is contained in:
atomiks
2018-02-26 09:02:45 +10:00
parent 5944266e98
commit 4ea2fbdff4
10 changed files with 4107 additions and 8 deletions

View File

@ -31,6 +31,7 @@
visibility: hidden;
opacity: 0;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
max-height: 378px;
margin-top: 44px;
box-shadow: 0 0.25rem 0.5rem -0.1rem rgba(0, 32, 128, 0.2);

View File

@ -3,6 +3,13 @@ export const selectAll = s => [].slice.call(document.querySelectorAll(s))
export const scrollY = () => window.scrollY || window.pageYOffset
export const easeOutQuint = (t, b, c, d) => c * ((t = t / d - 1) * t ** 4 + 1) + b
/*
* Make iOS behave normally.
*/
if (/iPhone|iPad|iPod/.test(navigator.platform) && !window.MSStream) {
document.body.style.cursor = 'pointer'
}
/*
* A small utility to fix the letter kerning on macOS Chrome and Firefox when using the system font
* (San Francisco). It is now fixed in the text rendering engine in FF 58 and Chrome 64.