media-feature

Display mode — CSS reference

Reports the presentation mode of the application, for example browser, standalone or fullscreen. It is not a CSS display property and does not establish whether a specific app is installed.

Formal Syntax & Structure

css syntaxcss
@media (display-mode: browser) { /* conditional declarations */ }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>display-mode</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}@media (display-mode: browser) {#a{color:rgb(0,100,0)}}</style><body><main id="a">Resize the viewport to explore this example.</main></body></html>
CSS Reference