liveBook · Manning

Media query

As explained in Acing the Frontend Interview

A CSS media query conditionally applies styles based on characteristics such as viewport dimensions, device capabilities, or media type.

A media query conditionally applies CSS styles according to characteristics such as viewport dimensions, device capabilities, or media type. It helps an interface adapt across devices and screen sizes while HTML remains responsible for content. section 2.2

In a frontend interview, a useful question is: how would the same page remain usable at different screen sizes? Explain what condition should change the styling, then distinguish that decision from arranging elements with flexbox or grid. The goal is a responsive, accessible interface—not merely a different appearance. section 2.2

How Acing the Frontend Interview covers it

How deep it goes
Introduces media queries as a CSS tool for responsiveness but does not work through query syntax or breakpoint selection.
Examples
Shows main and two-column print stylesheets as presentation variants, but no media-query rule.
What it assumes
Assumes familiarity with HTML and CSS as separate content and presentation layers.
What you can do after
Evaluate/understand when conditional CSS styling helps an interface adapt across screen sizes.
How it connects
Connects media queries with CSS, HTML, flexbox, grid, accessibility, and media types.

Also explained in

Compare how 8 books explain media query →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Frontend Interview. The section links point to the parts of the book it draws on.