diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-07-15 18:22:19 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-07-15 18:22:19 +0900 |
| commit | e7f1ab2d01f92558ff5e230663d951686390d35a (patch) | |
| tree | fdaadd0b3364fcbdd5d83a9b1a0f366fcdc85cfa /src/client/init.ts | |
| parent | fix(client): Fix #6540 (diff) | |
| download | misskey-e7f1ab2d01f92558ff5e230663d951686390d35a.tar.gz misskey-e7f1ab2d01f92558ff5e230663d951686390d35a.tar.bz2 misskey-e7f1ab2d01f92558ff5e230663d951686390d35a.zip | |
fix(client): Fix #6526
Diffstat (limited to 'src/client/init.ts')
| -rw-r--r-- | src/client/init.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/init.ts b/src/client/init.ts index 8a08267321..134285ca8e 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -59,6 +59,16 @@ if (localStorage.getItem('theme') == null) { applyTheme(lightTheme); } +//#region SEE: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ +// TODO: いつの日にか消したい +const vh = window.innerHeight * 0.01; +document.documentElement.style.setProperty('--vh', `${vh}px`); +window.addEventListener('resize', () => { + const vh = window.innerHeight * 0.01; + document.documentElement.style.setProperty('--vh', `${vh}px`); +}); +//#endregion + //#region Detect the user language let lang = localStorage.getItem('lang'); |