Feature Queries
suggest change@supports applies rules according to CSS capabilities instead of browser identity:
.component {
display: block;
}
@supports (container-type: inline-size) {
.component-list {
container-type: inline-size;
}
@container (width >= 30rem) {
.component {
display: grid;
grid-template-columns: 10rem 1fr;
}
}
}
Conditions can use not, and, and or. A successful property/value parse does not guarantee that every implementation is bug-free, but it is much more robust than targeting browser names or parsing defects.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents