:in-range and :out-of-range CSS pseudo-classes

- WD

If a temporal or number <input> has max and/or min attributes, then :in-range matches when the value is within the specified range and :out-of-range matches when the value is outside the specified range. If there are no range constraints, then neither pseudo-class matches.

IE

  1. 5.5 - 10
  2. 11

Edge

  1. 12
  2. 13 - 18
  3. 79 - 81
  4. 83

Firefox

  1. 2 - 28
  2. 29 - 49
  3. 50 - 77
  4. 78
  5. 79 - 80

Chrome

  1. 4
  2. 5 - 14
  3. 15 - 51
  4. 52
  5. 53 - 81
  6. 83
  7. 84 - 86

Safari

  1. 3.1 - 4
  2. 5
  3. 5.1 - 10
  4. 10.1 - 13
  5. 13.1
  6. 14 - TP

Opera

  1. 9 - 9.6
  2. 10 - 12.1
  3. 15 - 38
  4. 39
  5. 40 - 68
  6. 69

iOS Safari

  1. 3.2 - 4.3
  2. 5 - 10.2
  3. 10.3 - 13.3
  4. 13.4
  5. 14.0

Opera Mini

  1. all

Android Browser

  1. 2.1 - 3
  2. 4 - 4.4.4
  3. 81

Blackberry Browser

  1. 7
  2. 10

Opera Mobile

  1. 10 - 12.1
  2. 46

Chrome for Android

  1. 81

Firefox for Android

  1. 68

IE Mobile

  1. 10
  2. 11

UC Browser for Android

  1. 12.12

Samsung Internet

  1. 4
  2. 5 - 11.2
  3. 12.0

QQ Browser

  1. 10.4

Baidu Browser

  1. 7.12

KaiOS Browser

  1. 2.5

Note that <input type="range"> can never match :out-of-range because the user cannot input such a value, and if the initial value is outside the range, the browser immediately clamps it to the minimum or maximum (as appropriate) bound of the range.

Resources:
MDN Web Docs - CSS :out-of-range
WHATWG HTML specification for `:in-range` and `:out-of-range`