-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[selectors-4] Should :user-valid and :user-invalid apply to form and fieldset elements? #9257
Comments
The newly added HTML spec currently explicitly does not apply the :user-* pseudos on fieldset / form, I haven't really thought too much about this personally. If we really wanted to define those pseudos on fieldset / form, they could be defined as the equivalent of |
I think I have a slight preference for making I don't think it's fine to make these effectively
|
I'm happy to make :user-valid and :user-invalid not match forms and fieldsets. After all, this is already the interoperable behavior and we just need spec and tests for it. Nobody so far has really advocated for them applying to forms and fieldsets yet as far as I can tell. I am adding a WPT here: https://chromium-review.googlesource.com/c/chromium/src/+/4839394 |
I think they don't match per spec already right? https://html.spec.whatwg.org/#selector-user-valid mentions it only matches |
Yeah, we just need to do something about this note in the CSS spec: https://drafts.csswg.org/selectors-4/#issue-df919919 |
…ldset This is being discussed here: w3c/csswg-drafts#9257 This behavior is already interoperable, so this test should pass in all browsers. Bug: 1156069 Change-Id: I02a4ae0d628b37196ef269e066b3272114ed0b61
This patch adds tests for :valid, :invalid, :user-invalid, and :user-valid on <form>s, <fieldset>s, and <input>s. This is being discussed here: w3c/csswg-drafts#9257 This behavior is already interoperable, so this test should pass in all browsers. Bug: 1156069 Change-Id: I02a4ae0d628b37196ef269e066b3272114ed0b61
Why are these pseudo-classes defined in two places, incompatible with each other? I'd remove the CSS spec section on these, or make it point to html, probably? |
Sounds good, I opened a PR to do so here: #9308 |
This patch adds tests for :valid, :invalid, :user-invalid, and :user-valid on <form>s, <fieldset>s, and <input>s. This is being discussed here: w3c/csswg-drafts#9257 This behavior is already interoperable, so this test should pass in all browsers. Bug: 1156069 Change-Id: I02a4ae0d628b37196ef269e066b3272114ed0b61
This patch adds tests for :valid, :invalid, :user-invalid, and :user-valid on <form>s, <fieldset>s, and <input>s. This is being discussed here: w3c/csswg-drafts#9257 This behavior is already interoperable, so this test should pass in all browsers. Bug: 1156069 Change-Id: I02a4ae0d628b37196ef269e066b3272114ed0b61 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4839394 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1192951}
This patch adds tests for :valid, :invalid, :user-invalid, and :user-valid on <form>s, <fieldset>s, and <input>s. This is being discussed here: w3c/csswg-drafts#9257 This behavior is already interoperable, so this test should pass in all browsers. Bug: 1156069 Change-Id: I02a4ae0d628b37196ef269e066b3272114ed0b61 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4839394 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1192951}
This patch adds tests for :valid, :invalid, :user-invalid, and :user-valid on <form>s, <fieldset>s, and <input>s. This is being discussed here: w3c/csswg-drafts#9257 This behavior is already interoperable, so this test should pass in all browsers. Bug: 1156069 Change-Id: I02a4ae0d628b37196ef269e066b3272114ed0b61 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4839394 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1192951}
…d fieldsets, a=testonly Automatic update from web-platform-tests Add WPT for validity pseudos on forms and fieldsets This patch adds tests for :valid, :invalid, :user-invalid, and :user-valid on <form>s, <fieldset>s, and <input>s. This is being discussed here: w3c/csswg-drafts#9257 This behavior is already interoperable, so this test should pass in all browsers. Bug: 1156069 Change-Id: I02a4ae0d628b37196ef269e066b3272114ed0b61 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4839394 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1192951} -- wpt-commits: d1f9cf3e9067d21eeae980996fed25b45358a4de wpt-pr: 41801
…d fieldsets, a=testonly Automatic update from web-platform-tests Add WPT for validity pseudos on forms and fieldsets This patch adds tests for :valid, :invalid, :user-invalid, and :user-valid on <form>s, <fieldset>s, and <input>s. This is being discussed here: w3c/csswg-drafts#9257 This behavior is already interoperable, so this test should pass in all browsers. Bug: 1156069 Change-Id: I02a4ae0d628b37196ef269e066b3272114ed0b61 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4839394 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1192951} -- wpt-commits: d1f9cf3e9067d21eeae980996fed25b45358a4de wpt-pr: 41801
I know It is already resolvers but what about additional |
@kbrilla Can you file a separate issue for this? |
Will do |
I think this would be good to have, bacause we can use <form id="form1>
<input>
<input form="form2">
</form>
<form id="form2>
<input>
<input form="form1">
</form>
<input form="form1">
<input form="form2"> |
This patch adds tests for :valid, :invalid, :user-invalid, and :user-valid on <form>s, <fieldset>s, and <input>s. This is being discussed here: w3c/csswg-drafts#9257 This behavior is already interoperable, so this test should pass in all browsers. Bug: 1156069 Change-Id: I02a4ae0d628b37196ef269e066b3272114ed0b61 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4839394 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1192951}
Agenda+ to consider in light of #9257 (comment) from @morki ; with proposed definitions from @emilio in #9257 (comment) |
The selectors-4 spec says this here after the definition of :user-valid and :user-invalid: https://drafts.csswg.org/selectors-4/#issue-df919919
I made a quick demo here: https://jsfiddle.net/jarhar/Lohxsz2n/30/
It looks like :valid and :invalid apply to form elements, whereas :user-valid and :user-invalid don't apply to forms. This behavior is the same across chrome, firefox, and safari.
Should we standardize this behavior which happens to already be interoperable? Or should we make changes to make :user-valid and :user-invalid apply to forms and fieldsets?
@nt1m
The text was updated successfully, but these errors were encountered: