Media Queries
In my opinion, media queries are the biggest agent of change in website design for many years—probably since CSS itself became mainstream. The widespread adoption of CSS allowed you to leave behind the rigid limitations of table-based websites, and media queries take that a step further, letting you style pages in a way that’s sympathetic to the specifications of each device your sites are displayed on.
A media query is a logical statement: If the logic is true, the style rules within the statement are applied; if the logic is false, the rules are skipped. The parameters of the statements are known as media features, and the most commonly used today concern the dimensions of the device or the viewport. But before discussing media ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access