Hide all but one custom field in the user approval review queue

Ah right that doesn’t work, and it’s expected… I always forget that nth-of-type focuses on the element, and not the class.

So in this case there’s no element and only class names so it’s not working, but if you do add the element (div in this case), it will then only match if the first div sibling also has the .user-field class (it doesn’t because there are other divs within this parent that come before the user-fields).

Anyway, long story short… a general sibling combinator works here instead. Within .reviewable-user-fields this selects all .user-field that are a sibling of the first .user-field.

.reviewable-user-fields .user-field ~ .user-field {
    display: none;
}