Open
Description
Based on the current implementation in Chrome Canary and Safari TP Container Queries seems to only need a property name – allowing them to be used to expose nesting context.
/* this works */
.container-a {
container-name: A;
container-type: inline-size;
}
@container A (inline-size) {
.child { color: orange; }
}
IMO it makes a lot of sense to use Container Queries to handle this scenario (child styling without a direct reference to the container selector(s)).
If possible it would be nice if container-name
could be used without having to specify container-type
and query
/* simplified syntax (suggestion) */
.container-a {
container-name: A;
}
@container A {
.child { color: orange; }
}
I hope it makes sense and that I haven't overlooked existing issues
Thank you for your hard work – it is highly appreciated
😃