Is there a way to detect I am running in Capacitor with CSS? #7006
Replies: 2 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
To detect native application or standalone PWA and adapt your CSS styles, you can follow these steps:
This approach ensures that your styles are dynamically adjusted based on the running environment of your application |
Beta Was this translation helpful? Give feedback.
-
When running in a PWA, I can detect the display mode
standalone
using a mediaquery(display-mode: standalone)
. This helps me change the CSS for the installed apps (eg, disable hover on certain elements).However, this doesn't seem to work in Capacitor. I am aware of
Capacitor.isNativePlatform
, but I'd like a CSS solution. How can I tell when the app is running under Capacitor using CSS?Beta Was this translation helpful? Give feedback.
All reactions