W3cubDocs

/Support Tables

CSS display: contents

display: contents causes an element's children to appear as if they were direct children of the element's parent, ignoring the element itself. This can be useful when a wrapper element should be ignored when using CSS grid or similar layout techniques.

Spec https://w3c.github.io/csswg-drafts/css-display/
Status W3C Candidate Recommendation
IE Edge Firefox Chrome Safari Opera
      108    
    107 107 TP (5)  
    106 106 16.1 (5)  
11 105 105 105 16.0 (4,5) 91
10 104 104 104 15.6 (2) 90
9 103 103 103 15.5 (2) 89
8 102 102 102 15.4 (2) 88
Show all
7 101 101 101 15.2-15.3 (2) 87
6 100 100 100 15.1 (2) 86
5.5 99 99 99 15 (2) 85
  98 98 98 14.1 (2) 84
  97 97 97 14 (2) 83
  96 96 96 13.1 (2) 82
  95 95 95 13 (2,3) 81
  94 94 94 12.1 (2,3) 80
  93 93 93 12 (2,3) 79
  92 92 92 11.1 (2,3) 78
  91 91 91 11 77
  90 90 90 10.1 76
  89 89 89 10 75 (2)
  88 (2) 88 88 (2) 9.1 74 (2)
  87 (2) 87 87 (2) 9 73 (2)
  86 (2) 86 86 (2) 8 72 (2)
  85 (2) 85 85 (2) 7.1 71 (2)
  84 (2) 84 84 (2) 7 70 (2)
  83 (2) 83 83 (2) 6.1 69 (2)
  81 (2) 82 81 (2) 6 68 (2)
  80 (2) 81 80 (2) 5.1 67 (2)
  79 (2) 80 79 (2) 5 66 (2)
  18 79 78 (2) 4 65 (2)
  17 78 77 (2) 3.2 64 (2)
  16 77 76 (2) 3.1 63 (2)
  15 76 75 (2)   62 (2)
  14 75 74 (2)   60 (2)
  13 74 73 (2)   58 (2)
  12 73 72 (2)   57 (2)
    72 71 (2)   56 (2)
    71 70 (2)   55 (2)
    70 69 (2)   54 (2)
    69 68 (2)   53 (2)
    68 67 (2)   52 (2)
    67 66 (2)   51
    66 65 (2)   50
    65 64 (1)   49
    64 63 (1)   48
    63 62 (1)   47
    62 61 (1)   46
    61 (2) 60 (1)   45
    60 (2) 59 (1)   44
    59 (2) 58 (1)   43
    58 (2) 57   42
    57 (2) 56   41
    56 (2) 55   40
    55 (2) 54   39
    54 (2) 53   38
    53 (2) 52   37
    52 (2) 51   36
    51 (2) 50   35
    50 (2) 49   34
    49 (2) 48   33
    48 (2) 47   32
    47 (2) 46   31
    46 (2) 45   30
    45 (2) 44   29
    44 (2) 43   28
    43 (2) 42   27
    42 (2) 41   26
    41 (2) 40   25
    40 (2) 39   24
    39 (2) 38   23
    38 (2) 37   22
    37 (2) 36   21
    36 35   20
    35 34   19
    34 33   18
    33 32   17
    32 31   16
    31 30   15
    30 29   12.1
    29 28   12
    28 27   11.6
    27 26   11.5
    26 25   11.1
    25 24   11
    24 23   10.6
    23 22   10.5
    22 21   10.0-10.1
    21 20   9.5-9.6
    20 19   9
    19 18    
    18 17    
    17 16    
    16 15    
    15 14    
    14 13    
    13 12    
    12 11    
    11 10    
    10 9    
    9 8    
    8 7    
    7 6    
    6 5    
    5 4    
    4      
    3.6      
    3.5      
    3      
    2      
Safari on iOS Opera Mini Android Browser Blackberry Browser Opera Mobile Android Chrome Android Firefox IE Mobile Android UC Browser Samsung Internet QQ Browser Baidu Browser KaiOS Browser
16.1 (5)                        
16.0 (4,5) all 105 10 64 105 104 11 13.4 (2) 18.0 13.1 (2) 13.18 2.5 (2)
15.6 (2)   4.4.3-4.4.4 7 12.1     10   17.0      
15.5 (2)   4.4   12         16.0      
15.4 (2)   4.2-4.3   11.5         15.0      
Show all
15.2-15.3 (2)   4.1   11.1         14.0 (2)      
15.0-15.1 (2)   4   11         13.0 (2)      
14.5-14.8 (2)   3   10         12.0 (2)      
14.0-14.4 (2)   2.3             11.1-11.2 (2)      
13.4-13.7 (2)   2.2             10.1 (2)      
13.3 (2,3)   2.1             9.2 (2)      
13.2 (2,3)                 8.2      
13.0-13.1 (2,3)                 7.2-7.4      
12.2-12.5 (2,3)                 6.2-6.4      
12.0-12.1 (2,3)                 5.0-5.4      
11.3-11.4 (2,3)                 4      
11.0-11.2                        
10.3                        
10.0-10.2                        
9.3                        
9.0-9.2                        
8.1-8.4                        
8                        
7.0-7.1                        
6.0-6.1                        
5.0-5.1                        
4.2-4.3                        
4.0-4.1                        
3.2                        

Notes

  1. Enabled through the "experimental Web Platform features" flag in chrome://flags.

  2. Partial support refers to severe implementation bug that renders content inaccessible.

  3. Buggy support. See 188259 and 193567

  4. Buttons are not accessible with display: contents applied. See 243486

  5. HTML Tables are not accessible with display: contents applied. See 239479 and 239478

Bugs

  • iOS Safari 10 and 11, and Safari 11 renders display:contents as display:inline. @supports will also report as true.

Resources

Data by caniuse.com
Licensed under the Creative Commons Attribution License v4.0.
https://caniuse.com/css-display-contents