remove webkit hack
This commit is contained in:
parent
9ea7c32bfd
commit
476a36b79a
2 changed files with 0 additions and 5 deletions
|
@ -8,9 +8,6 @@ function initViewportSizeHandler() {
|
||||||
if (method === "dynamicViewportUnits") {
|
if (method === "dynamicViewportUnits") {
|
||||||
root.style.setProperty("--viewportWidth", "100dvw");
|
root.style.setProperty("--viewportWidth", "100dvw");
|
||||||
root.style.setProperty("--viewportHeight", "100dvh");
|
root.style.setProperty("--viewportHeight", "100dvh");
|
||||||
} else if (method === "webkitHack") {
|
|
||||||
root.style.setProperty("--viewportWidth", "100vw");
|
|
||||||
root.style.setProperty("--viewportHeight", "-webkit-fill-available");
|
|
||||||
} else if (method === "javascriptResponsive") {
|
} else if (method === "javascriptResponsive") {
|
||||||
const updateUnits = () => {
|
const updateUnits = () => {
|
||||||
root.style.setProperty("--viewportWidth", `${window.innerWidth}px`);
|
root.style.setProperty("--viewportWidth", `${window.innerWidth}px`);
|
||||||
|
|
|
@ -23,8 +23,6 @@ const defaults = {
|
||||||
|
|
||||||
if (CSS.supports("(width: 1dvw)")) {
|
if (CSS.supports("(width: 1dvw)")) {
|
||||||
return "dynamicViewportUnits";
|
return "dynamicViewportUnits";
|
||||||
} else if (isTouch && CSS.supports("(-webkit-touch-callout: none)")) {
|
|
||||||
return "webkitHack";
|
|
||||||
} else if (isTouch) {
|
} else if (isTouch) {
|
||||||
return "javascriptResponsive";
|
return "javascriptResponsive";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue