fix: try fix float bar inset bottom

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2024-11-24 17:12:27 +08:00
parent 555fc4cde9
commit 3110f953da
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
2 changed files with 9 additions and 2 deletions

View File

@ -60,8 +60,10 @@ export const MobileFloatBar = ({
useEffect(() => {
if (isScrollDown) {
const computedStyle = getComputedStyle(document.documentElement)
const safeAreaBottom = computedStyle.getPropertyValue("--sab")
animateController.start({
translateY: "calc(100% + 40px + env(safe-area-inset-bottom))",
translateY: `calc(100% + 40px + ${safeAreaBottom})`,
transition: { type: "tween", duration: 0.1 },
})
} else {

View File

@ -2,7 +2,12 @@ html,
#shadow-html {
--fo-font-family: "SN Pro", system-ui, sans-serif;
}
:root {
--sat: env(safe-area-inset-top);
--sar: env(safe-area-inset-right);
--sab: env(safe-area-inset-bottom);
--sal: env(safe-area-inset-left);
}
* {
-webkit-tap-highlight-color: transparent;
}