concept
Container query range syntax — CSS reference
Size features support comparison operators and chained range syntax. Inclusive and exclusive boundaries are explicit. Here 240px satisfies both comparisons; a width of 250px would not match.
Formal Syntax & Structure
css syntaxcss
@container (200px <= width < 250px) { /* descendant styles */ }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>container-query-range-syntax</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}#box{width:240px;height:120px;container-type:size}@container (200px <= width < 250px){#a{color:rgb(0,100,0)}}</style><body><section id="box"><div id="a">Component</div></section></body></html>