What is the significance of the '@supports' rule in CSS?
Instruction: Explain how the '@supports' rule works and its importance in modern web development.
Context: This question assesses the candidate's knowledge of CSS feature queries, enabling conditional CSS rules based on browser support for specific features.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
@supports conditionally applies a group of declarations when the browser reports support for a CSS feature. Put the usable baseline outside the feature query, so browsers that do not understand the query can still use it.
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>CSS example</title> <style> .cards { display: block; } .cards >...