W3cubDocs

/Support Tables

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

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.

Spec https://www.w3.org/TR/selectors4/#range-pseudos
Status W3C Working Draft
IE Edge Firefox Chrome Safari Opera
      73    
    65 72    
    64 71 TP  
11 18 (2) 63 70 12 56
10 17 (2) 62 69 11.1 55
9 16 (2) 61 68 11 54
8 15 (2) 60 67 10.1 53
Show all
7 14 (2) 59 66 10 (2,3) 52
6 13 (2) 58 65 9.1 (2,3) 51
5.5 12 57 64 9 (2,3) 50
    56 63 8 (2,3) 49
    55 62 7.1 (2,3) 48
    54 61 7 (2,3) 47
    53 60 6.1 (2,3) 46
    52 59 6 (2,3) 45
    51 58 5.1 (2,3) 44
    50 57 5 43
    49 (3) 56 4 42
    48 (3) 55 3.2 41
    47 (3) 54 3.1 40
    46 (3) 53   39 (2)
    45 (3) 52 (2)   38 (2,3)
    44 (3) 51 (2,3)   37 (2,3)
    43 (3) 50 (2,3)   36 (2,3)
    42 (3) 49 (2,3)   35 (2,3)
    41 (3) 48 (2,3)   34 (2,3)
    40 (3) 47 (2,3)   33 (2,3)
    39 (3) 46 (2,3)   32 (2,3)
    38 (3) 45 (2,3)   31 (2,3)
    37 (3) 44 (2,3)   30 (2,3)
    36 (3) 43 (2,3)   29 (2,3)
    35 (3) 42 (2,3)   28 (2,3)
    34 (3) 41 (2,3)   27 (2,3)
    33 (3) 40 (2,3)   26 (2,3)
    32 (3) 39 (2,3)   25 (2,3)
    31 (3) 38 (2,3)   24 (2,3)
    30 (3) 37 (2,3)   23 (2,3)
    29 (3) 36 (2,3)   22 (2,3)
    28 35 (2,3)   21 (2,3)
    27 34 (2,3)   20 (2,3)
    26 33 (2,3)   19 (2,3)
    25 32 (2,3)   18 (2,3)
    24 31 (2,3)   17 (2,3)
    23 30 (2,3)   16 (2,3)
    22 29 (2,3)   15 (2,3)
    21 28 (2,3)   12.1 (2)
    20 27 (2,3)   12 (2)
    19 26 (2,3)   11.6 (2)
    18 25 (2,3)   11.5 (2)
    17 24 (2,3)   11.1 (2)
    16 23 (2,3)   11 (2)
    15 22 (2,3)   10.6 (2)
    14 21 (2,3)   10.5 (2)
    13 20 (2,3)   10.0-10.1 (2)
    12 19 (2,3)   9.5-9.6
    11 18 (2,3)   9
    10 17 (2,3)    
    9 16 (2,3)    
    8 15 (2,3)    
    7 14    
    6 13    
    5 12    
    4 11    
    3.6 10    
    3.5 9    
    3 8    
    2 7    
      6    
      5    
      4    
iOS Safari Opera Mini Android Browser Blackberry Browser Opera Mobile Android Chrome Android Firefox IE Mobile Android UC Browser Samsung Internet QQ Browser Baidu Browser
12 all (1) 67 10 (2) 46 70 63 11 11.8 7.2 1.2 7.12
11.3-11.4   4.4.3-4.4.4 (2) 7 12.1 (2)     10   6.2    
11.0-11.2   4.4 (2)   12 (2)         5    
10.3   4.2-4.3 (2)   11.5 (2)         4 (2)    
Show all
10.0-10.2 (2,3)   4.1 (2)   11.1 (2)              
9.3 (2,3)   4 (2)   11 (2)              
9.0-9.2 (2,3)   3   10 (2)              
8.1-8.4 (2,3)   2.3                  
8 (2,3)   2.2                  
7.0-7.1 (2,3)   2.1                  
6.0-6.1 (2,3)                      
5.0-5.1 (2,3)                      
4.2-4.3                      
4.0-4.1                      
3.2                      

Notes

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.

  1. Opera Mini correctly applies style on initial load, but does not correctly update when value is changed.

  2. :in-range also incorrectly matches temporal and number inputs which don't have min or max attributes. See Edge bug, Chrome bug, WebKit bug.

  3. :in-range and :out-of-range incorrectly match inputs which are disabled or readonly. See Edge bug, Mozilla bug, WebKit bug, Chrome bug.

Resources

Data by caniuse.com
Licensed under the Creative Commons Attribution License v4.0.
http://caniuse.com/#feat=css-in-out-of-range