Fill in less than five characters in the first min-length field below.
Remove at least one character from the first max-length field below.
The first field has a minlength="5" attribute, so it should switch to the invalid state and apply
a red background (input:invalid {background: red}).
The second field has a maxlength="5" attribute, so it should switch to the invalid state and apply
a red background (input:invalid {background: red}).
Both work as expected in Safari and Chrome. (Edge does not appear to support the
minlength/:invalid combination.)
In Firefox the fields remain in their valid state.
Now try the same test in the third and fourth fields below. They turn red.
The difference is that the first two fields are contained in a fieldset with fieldset:valid {content: 'string'}
and fieldset:invalid {content: 'string'}. Removing both removes the bug.