The display-mode media feature detects how your page is shown — in a browser tab, as an installed PWA, fullscreen, or with minimal UI. Adapt styles to match the launch context.
01
@media
Media query.
02
browser
Normal tab.
03
standalone
Installed PWA.
04
fullscreen
No chrome.
05
minimal-ui
Lite chrome.
06
vs display
Not layout.
Fundamentals
Introduction
The @media (display-mode) feature applies CSS based on how the user opened your site. A page in a normal browser tab behaves differently from the same page launched as an installed Progressive Web App (PWA) from a home screen or desktop shortcut.
With display-mode, you can hide browser-only UI (like install banners), add app-style navigation, adjust safe-area padding, and create immersive fullscreen experiences for games and media.
Definition and Usage
Write @media (display-mode: standalone), @media (display-mode: browser), or other values inside your stylesheet. When the page runs in that mode, the nested rules apply.
💡
Beginner Tip
Do not confuse this with the CSS display property (block, flex, grid). display-mode is a media query about how the app is launched, not how elements lay out.
Foundation
📝 Syntax
Use a display mode keyword inside an @media rule:
syntax.css
@media(display-mode:standalone){/* Installed PWA without browser toolbar */}@media(display-mode:fullscreen){/* Full screen, no browser UI */}@media(display-mode:browser){/* Standard browser tab */}
Accepted Values
browser — Standard browser window with full address bar and controls (default when visiting a URL).
standalone — Installed PWA running in its own window without browser UI.
minimal-ui — Minimal browser chrome; some navigation controls remain visible.
fullscreen — Entire screen; no browser UI at all.
window-controls-overlay — Desktop PWA with the Window Controls Overlay API active.
Display Modes at a Glance
browser Full browser tab with address bar and controls.
standalone App-like window; no browser toolbar (typical PWA).
minimal-ui Reduced browser chrome; back/refresh may show.
fullscreen Immersive; entire viewport for content.
Fullscreen mode is ideal for video players, games, and presentations where site chrome would distract.
Tips
💬 Usage Tips
Match manifest display — Set "display": "standalone" in your web app manifest for consistent PWA behavior.
Hide redundant UI — Remove install prompts and browser promos in standalone/fullscreen.
Safe-area insets — Combine with env(safe-area-inset-*) for notched phones in standalone.
Test both contexts — Open the same URL in a tab and from the home screen icon.
Progressive defaults — Browser mode should work fully without PWA-specific styles.
Watch Out
⚠️ Common Pitfalls
Confusing with display property — Media display-mode ≠ CSS display: flex.
Assuming standalone on desktop — Users may always use browser mode unless they install the PWA.
Hiding essential nav — Ensure browser-mode users can still navigate without the PWA bottom bar.
Only styling standalone — Consider fullscreen and minimal-ui too if your manifest supports them.
Skipping browser testing — Most first visits happen in browser mode.
A11y
♿ Accessibility
Keyboard navigation — App-style nav must remain keyboard accessible in standalone mode.
Exit fullscreen — Provide a visible control to leave fullscreen; don’t trap users.
Focus management — When hiding headers, ensure focus order still makes sense.
Contrast in all modes — PWA chrome changes must still meet WCAG contrast requirements.
Don’t rely on mode alone — Core content must work in browser mode without installation.
🧠 How display-mode Works
1
User launches the app
They open a URL in a tab, install a PWA, or enter fullscreen.
Launch
2
Browser reports mode
The user agent sets the active display mode: browser, standalone, fullscreen, etc.
Detect
3
@media rules apply
Matching @media (display-mode: …) blocks update layout and visibility.
Apply
=
📱
Context-aware UI
The app feels native in standalone and immersive in fullscreen.
Compatibility
🖥 Browser Compatibility
The display-mode media feature is supported in modern browsers, especially for PWAs.
✓ Baseline · Modern browsers
PWA display mode queries
Works in Chrome, Firefox, Safari, and Edge.
95%Global support
display-mode media feature95% supported
Bottom line:display-mode is production-ready for PWA styling. Test installed and browser contexts on target devices.
Wrap Up
🎉 Conclusion
The display-mode media feature lets you tailor your UI to how users launch your site — browser tab, installed PWA, minimal UI, or fullscreen. It is one of the most practical media queries for Progressive Web Apps.
Hide install banners in standalone, add app navigation when browser chrome is gone, and create immersive fullscreen layouts for media apps. Always keep browser mode fully functional for first-time visitors.
Use these points when styling PWAs and launch contexts.
5
Core concepts
PWA01
standalone
Installed app.
Key mode
Tab02
browser
Default visit.
Mode
FS03
fullscreen
Immersive.
Mode
≠04
Not display
Launch context.
Compare
🌐05
95% support
Modern browsers.
Compat
❓ Frequently Asked Questions
The display-mode media feature detects how a web page is presented — in a normal browser tab, as an installed PWA (standalone), in fullscreen, or with minimal browser chrome. Use @media (display-mode: standalone) and similar queries to adapt styles to the launch context.
Common values are browser (standard tab with full browser UI), standalone (installed PWA without browser toolbar), minimal-ui (minimal browser controls), and fullscreen (entire screen, no browser UI). window-controls-overlay matches when the Window Controls Overlay API is active on desktop PWAs.
The media feature checks how the app is launched (browser vs PWA vs fullscreen). The display property controls layout of an element (block, flex, grid, none). They share a name but solve completely different problems.
Use it to hide install prompts in standalone mode, adjust padding for safe areas, show app-style navigation without browser chrome, or tweak fullscreen layouts for games and media apps.
Yes. display-mode is supported in modern Chrome, Firefox, Safari, and Edge. It is especially useful for Progressive Web Apps installed to the home screen or desktop.