Skip to content

[selectors-4] Should :user-valid and :user-invalid apply to form and fieldset elements? #9257

@josepharhar

Description

@josepharhar

The selectors-4 spec says this here after the definition of :user-valid and :user-invalid: https://drafts.csswg.org/selectors-4/#issue-df919919

Clarify that this (and :invalid/:valid) can apply to form and fieldset elements.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Agenda+ LaterLower-priority items that are flagged for CSSWG discussionselectors-4Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions