Why have custom validation styles? #32
Replies: 1 comment 1 reply
-
You probably wouldn't for that case. But you may want to do: [data-wa-invalid] {} as an easier way to style only invalid Web Awesome form controls and not affect any regular form controls on the page. I try to think of the
We're definitely going to work on documenting cases like this. You could also do:
Not sure what this would afford us. I tested it out in VoiceOver and EDIT: Also, the I wish there was an |
Beta Was this translation helpful? Give feedback.
-
Form-associated custom element already use the browser's built-in pseudo classes for validation (except for user-valid and user-invalid). Why would someone want to use
wa-input[data-wa-invalid]
overwa-input:invalid
? Also, it may hide the fact that you can do things likeform:has(:invalid) { border-color: red' }
when using these components. Lastly, if you are trying to simulate user-valid and user-invalid, it would be much better to add the attributearia-invalid
to the form control.Beta Was this translation helpful? Give feedback.
All reactions