refactor(client): use dvh
This commit is contained in:
parent
1751bfea5f
commit
831be69cec
6 changed files with 9 additions and 28 deletions
|
|
@ -82,16 +82,6 @@ import { getAccountFromId } from '@/scripts/get-account-from-id';
|
|||
else location.reload();
|
||||
});
|
||||
|
||||
//#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
|
||||
|
||||
// If mobile, insert the viewport meta tag
|
||||
if (['smartphone', 'tablet'].includes(deviceKind)) {
|
||||
const viewport = document.getElementsByName('viewport').item(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue