:in-range & :out-of-range CSS pseudo-classes shouldn't match inputs without range limitations

Confirmed Issue #7200501 • Assigned to Bogdan B.

Details

Author
Chris R.
Created
Apr 13, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Chrome
  • Safari
Found in build #
13.10586
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Steps to reproduce the problem:

  1. Open the attached testcase in Edge.
  2. Observe the background-colors and borders of the <input>s
    What is the expected behavior?
    The inputs should have neither a red border nor a red background-color,
    because they don’t have range limitations,
    because they have neither min nor max attributes
    and the HTML spec doesn’t define a default minimum or maximum for any of these input types.
    Therefore, these inputs should fail the 2nd of the 3 conditions required to match :in-range or :out-of-range.
    Per https://html.spec.whatwg.org/multipage/scripting.html#selector-in-range

The :in-range pseudo-class must match all elements that are […], have range limitations, and […]
What went wrong?
The inputs have red borders and/or red backgrounds, indicating that they matched the :in-range or :out-of-range pseudo-classes despite not having range limitations

Attachments

Comments and activity

You need to sign in to your Microsoft account to add a comment.

Sign in