Frederik Held

Results 50 comments of Frederik Held

There is a different plugin that does this: https://www.npmjs.com/package/capacitor-plugin-safe-area I've never used it though, so no recommendation, just information.

Thank you for the hint about the injected css variable. A JavaScript getter would still be useful. Use Case: I have a map that covers the top half of the...

> Could you provide me with some info as why you would want a getter function? This plugin injects a CSS variable which you can use directly in your CSS....

Ah, okay. Thanks a lot for the clarification!

I understand. But reading computed styles only works in some cases. If the plugin knows those values before the CSS is rendered, it would help if we could access them...

> > If the plugin knows those values before the CSS is rendered, it would help if we could access them directly through JS. > > Using a `new MutationObserver`...

> > I have a map that covers the top half of the screen and goes right to the edge. So there is an unsafe part that the user can't...

Ok, understandable. Would you accept a PR? I won't promise anything, but if I don't find a solution to my case, I might be looking into it.

@dirkcremers This is exactly what @capacitor-community/safe-area helps you with. It exposes the correct margins as CSS values so you can use them to set margins to your containers. @tafelnl updated...

We do understand how the plugin works . It's just not enough to handle all issues that come with safe are insets. The plugin only covers the CSS side of...