Note that ordering matters in the above selector. Swapping the nesting of the two pseudo-classes would result matching any element which contains anything that’s not a heading element.
section:has(:not(h1, h2, h3, h4, h5, h6))
5 or more children
Make a list of 5 or more children a flat list.
ul:has(:nth-child(n+5)) li {
display: inline;
}
Adds semi-colon after each item in a list excepts last one