How to structure media queries in Sass

Sass logo

Practically every site now is built with at least a nod to responsive web design. The way we structure these responsive styles has a direct relation to how complex the project will be to maintain and edit in the future as updates are made and the project grows in size.

Despite this, it seems as though a widely accepted approach for how and where to structure these responsive styles is yet to be adopted consistently by developers. Although nowhere near as bad as 'the old days' of CSS, before preprocessors and naming methodologies, this is causing an inconsistent and often messy approach to structuring the responsive styles for elements.

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

Jamie Murphy is a Budapest-based frontend developer and CRO consultant.
Latest in Web Design & Development Software
screenshot of Framer landing page
5 seriously useful AI web design tools
Temu Shopping app on Samsung phone
I made my first order on Temu and this is how it went
Dev mode in Figma
Figma’s awesome new Dev Mode brings designers and developers together
some coins on a mobile phone
What is Web3? and is Apple getting involved?
Scott Belksy talks to Dylan Field at Adobe Max
Adobe just revealed the first change coming to Figma after acquisition
Figma and Adobe logos on a white background
Adobe is buying Figma, and creatives have... concerns
Latest in How to
Rob Redman's snowy image illustrates the AE tutorial: TDW313.PT_AE_Snow.indd
How to create realistic snow with particle systems using After Effects
Ivan Mironenko ZBrush character tutorial
Craft a game-ready character asset using ZBrush and Substance 3D Painter
Oliver Schümann ZBrush bizarre baby tutorial
Create a bizarre baby sculpture in ZBrush
Alireza Khoshpayam arch-viz tips
Speedy tips to create beautifully photoreal archviz using 3ds Max and Corona
Maya 3D abstract strands tutorial
How to easily create complex and abstract animation using Maya
Whiskytree battle damage effects tutorial
Create gnarly battle damage for vehicles using a mix of Maya and Nuke