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
    60 66    
    59 65   50
  17 (2) 58 64 TP 49
11 16 (2) 57 63 11 48
10 15 (2) 56 62 10.1 47
9 14 (2) 55 61 10 (2,3) 46
8 13 (2) 54 60 9.1 (2,3) 45
Show all
7 12 53 59 9 (2,3) 44
6   52 58 8 (2,3) 43
5.5   51 57 7.1 (2,3) 42
    50 56 7 (2,3) 41
    49 (3) 55 6.1 (2,3) 40
    48 (3) 54 6 (2,3) 39 (2)
    47 (3) 53 5.1 (2,3) 38 (2,3)
    46 (3) 52 (2) 5 37 (2,3)
    45 (3) 51 (2,3) 4 36 (2,3)
    44 (3) 50 (2,3) 3.2 35 (2,3)
    43 (3) 49 (2,3) 3.1 34 (2,3)
    42 (3) 48 (2,3)   33 (2,3)
    41 (3) 47 (2,3)   32 (2,3)
    40 (3) 46 (2,3)   31 (2,3)
    39 (3) 45 (2,3)   30 (2,3)
    38 (3) 44 (2,3)   29 (2,3)
    37 (3) 43 (2,3)   28 (2,3)
    36 (3) 42 (2,3)   27 (2,3)
    35 (3) 41 (2,3)   26 (2,3)
    34 (3) 40 (2,3)   25 (2,3)
    33 (3) 39 (2,3)   24 (2,3)
    32 (3) 38 (2,3)   23 (2,3)
    31 (3) 37 (2,3)   22 (2,3)
    30 (3) 36 (2,3)   21 (2,3)
    29 (3) 35 (2,3)   20 (2,3)
    28 34 (2,3)   19 (2,3)
    27 33 (2,3)   18 (2,3)
    26 32 (2,3)   17 (2,3)
    25 31 (2,3)   16 (2,3)
    24 30 (2,3)   15 (2,3)
    23 29 (2,3)   12.1 (2)
    22 28 (2,3)   12 (2)
    21 27 (2,3)   11.6 (2)
    20 26 (2,3)   11.5 (2)
    19 25 (2,3)   11.1 (2)
    18 24 (2,3)   11 (2)
    17 23 (2,3)   10.6 (2)
    16 22 (2,3)   10.5 (2)
    15 21 (2,3)   10.0-10.1 (2)
    14 20 (2,3)   9.5-9.6
    13 19 (2,3)   9
    12 18 (2,3)    
    11 17 (2,3)    
    10 16 (2,3)    
    9 15 (2,3)    
    8 14    
    7 13    
    6 12    
    5 11    
    4 10    
    3.6 9    
    3.5 8    
    3 7    
    2 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
11.0-11.2 all (1) 62 10 (2) 37 (2) 62 57 11 11.4 (2) 6.2 1.2 7.12
10.3   4.4.3-4.4.4 (2) 7 12.1 (2)     10   5    
10.0-10.2 (2,3)   4.4 (2)   12 (2)         4 (2)    
9.3 (2,3)   4.2-4.3 (2)   11.5 (2)              
Show all
9.0-9.2 (2,3)   4.1 (2)   11.1 (2)              
8.1-8.4 (2,3)   4 (2)   11 (2)              
8 (2,3)   3   10 (2)              
7.0-7.1 (2,3)   2.3                  
6.0-6.1 (2,3)   2.2                  
5.0-5.1 (2,3)   2.1                  
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