· August 22, 2020 · ⋆ CSS And that’s when I came across this CSS media feature display-mode which can be used to test the display mode of an application.
The fullscreen option, as its name suggests, would detect if the device is in the fullscreen mode, and based on that you can apply or alter some CSS.
If you want to perform some JavaScript related weight-lifting when the app switches to fullscreen mode, you can use window.matchMedia() method and attaching a listener to it which will monitor the display-mode changes like so.
If you like what I write and want me to continue doing the same, I would like you buy me some coffees.