concept

Desktop first — CSS reference

Desktop-first styling sets a wider-layout default and adds conditions for narrower viewports. It can be reasonable for a desktop-oriented tool, but smaller layouts must remain usable and source order must stay logical. This fixture changes column count at the breakpoint.

Formal Syntax & Structure

css syntaxcss
@media (max-width: 600px) { ... }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>desktop-first</title><style>body{margin:8px;font:16px/24px sans-serif;color:black;background:white}#a{box-sizing:border-box}#a{display:grid;grid-template-columns:repeat(2,1fr)}@media(max-width:600px){#a{grid-template-columns:1fr}}</style><body><div id="a"><div>Summary</div><div>Details</div></div></body></html>
CSS Reference