Container style queries are still in their infancy. Supported by Chromium and Safari, itβs one Iβll be keeping an eye on.
Container Style Queries allow you to query a CSS property or variable from a contianer.
You can currently use size queries, which come close to style queries. With style queries you can query the computed valyes of the query container. There is very little information around to know exactly how they will be used within CSS at the moment of writing this short piece.
.example {
container-name: example;
}
@container example(background:red) {
.example {
color: blue;
}
}