I\'m building a form and I want to use the :invalid
selector to give the \"required\" input fields a red border if the user presses submit without filling them, but
You can achieve this by chaining pseudo-classes:
that way the input field will just show invalid styles only when that input field required and focused.
Here is a helpful article: https://alistapart.com/article/forward-thinking-form-validation/
Another stack overflow thread on this: https://stackoverflow.com/a/7921385/11102617