How to use the @supports rule in your CSS

Have you ever used some form of CSS feature detection such as Modernizr to differentiate your CSS's behaviour based on whether a feature is supported? I bet most of you have. Although the cascading nature of CSS lets us provide fallbacks for many CSS features just by writing multiple declarations, sometimes we need more granular control over what is applied when some of our cutting edge bling isn't there.

Consider border-image. When it's unsupported, we usually want to provide a fallback background and a different border, which shouldn't apply when border-image applies. Another common case is new layout modules (Flexbox, Grid Layout and Regions); when they aren't available, we need to code an alternative layout using properties that could conflict with these technologies, which means they can't co-exist.

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

The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.