Quantity Queries
how many items they contain
/* 5 or more children? go compact */
.list:has(> :nth-child(5)) {
--density: compact;
}
.list:has(> :only-child) { /* the lone one */ } how many items they contain
/* 5 or more children? go compact */
.list:has(> :nth-child(5)) {
--density: compact;
}
.list:has(> :only-child) { /* the lone one */ }