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
Add a separator except to the last one.
ul:has(:nth-child(n+5)) li:not(:last-child)::after {
content: ';';
}
where:- nth-child and last-child are child selector