Mobile-first and responsive web design (RWD)

As the world became more and more mobile, web developers and web designers began pushing heavily toward a reversal of priorities. Where people initially created web applications with desktops in minds, they were now thinking in a mobile-first way.

This is rather logical; if the majority of potential users were using mobile devices, why would we want to treat mobile as an afterthought during development?

Web developers started using CSS media queries (https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) to define breakpoints: points at which the different CSS rules start getting applied. Media queries make it possible to define specific rules that apply depending on the device's size, orientation, pixel density, and much more.

This is beyond the scope of this book, but you can find a number of great examples at https://css-tricks.com/snippets/css/media-queries-for-standard-devices.

These are usually referred to as RWD techniques.