Spec: https://drafts.csswg.org/css-values-5/#if-notation
Looking at the spec I can see that style queries and media queries are supported but not container size queries.
I would like to be able to style based on the dimensions of the container:
background-color: if(
container(width > 1000px): green;
container(width > 800px): orange;
container(width > 600px): red;
else: rebeccapurple;
);
this would eliminate a lot of repetition compared to without if():
background-color: rebeccapurple;
@container (width > 600px) {
background-color: red;
}
@container (width > 800px) {
background-color: orange;
}
@container (width > 1000px) {
background-color: green;
}