formNoValidate button attribute still triggers :user-invalid CSS class
Although it does not require validation it still triggers the class. Is there a non-javascript way of solving this problem?
No, there is not a CSS only solution. The :user-invalid class is still applied even if the submit button has formNoValidate which is because CSS does not consider button attributes in styling.
The best workaround that still rquires JS is to use JS to add a class to the form when submitting a formNovalidate button and then override the style based on that.
:user-invalidpseudo-class is tied to the browser's validation state, not submission behavior, so even with theformNoValidateattribute, invalid fields will still trigger:user-invalid. What you can do is minimize its impact using CSS to style:user-invalidand make it less noticeable.