changed back to first/last-child instead of first/last-of-type for best support