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
    147 (2) 144 (2)    
    146 (2) 143 (2) TP (2)  
    145 (2) 142 (2) 26.1 (2)  
11 141 (2) 144 (2) 141 (2) 26.0 (2) 122 (2)
10 140 (2) 143 (2) 140 (2) 18.5-18.6 (2) 121 (2)
9 139 (2) 142 (2) 139 (2) 18.4 (2) 120 (2)
8 138 (2) 141 (2) 138 (2) 18.3 (2) 119 (2)
Show all
7 137 (2) 140 (2) 137 (2) 18.2 (2) 118 (2)
6 136 (2) 139 (2) 136 (2) 18.1 (2) 117 (2)
5.5 135 (2) 138 (2) 135 (2) 18.0 (2) 116 (2)
  134 (2) 137 (2) 134 (2) 17.6 (2) 115 (2)
  133 (2) 136 (2) 133 (2) 17.5 (2) 114 (2)
  132 (2) 135 (2) 132 (2) 17.4 (2) 113 (2)
  131 (2) 134 (2) 131 (2) 17.3 (2) 112 (2)
  130 (2) 133 (2) 130 (2) 17.2 (2) 111 (2)
  129 (2) 132 (2) 129 (2) 17.1 (2) 110 (2)
  128 (2) 131 (2) 128 (2) 17.0 (2) 109 (2)
  127 (2) 130 (2) 127 (2) 16.6 (2,3) 108 (2)
  126 (2) 129 (2) 126 (2) 16.5 (2,3) 107 (2)
  125 (2) 128 (2) 125 (2) 16.4 (2,3) 106 (2)
  124 (2) 127 (2) 124 (2) 16.3 (2,3) 105 (2)
  123 (2) 126 (2) 123 (2) 16.2 (2,3) 104 (2)
  122 (2) 125 (2) 122 (2) 16.1 (2,3) 103 (2)
  121 (2) 124 (2) 121 (2) 16.0 (2,3) 102 (2)
  120 (2) 123 (2) 120 (2) 15.6 (1) 101 (2)
  119 (2) 122 (2) 119 (2) 15.5 (1) 100 (2)
  118 (2) 121 (2) 118 (2) 15.4 (1) 99 (2)
  117 (2) 120 (2) 117 (2) 15.2-15.3 (1) 98 (2)
  116 (2) 119 (2) 116 (2) 15.1 (1) 97 (2)
  115 (2) 118 (2) 115 (2) 15 (1) 96 (2)
  114 (2) 117 (2) 114 (2) 14.1 (1) 95 (2)
  113 (2) 116 (2) 113 (2) 14 (1) 94 (2)
  112 (2) 115 (2) 112 (2) 13.1 (1) 93 (2)
  111 (2) 114 (2) 111 (2) 13 (1) 92 (2)
  110 (2) 113 (2) 110 (2) 12.1 (1) 91 (2)
  109 (2) 112 (2) 109 (2) 12 (1) 90 (2)
  108 (2) 111 (2) 108 (2) 11.1 (1) 89 (2)
  107 (2) 110 (2) 107 (2) 11 88 (2)
  106 (2) 109 (2) 106 (2) 10.1 87 (2)
  105 (2) 108 (2) 105 (2) 10 86 (2)
  104 (2) 107 (2) 104 (2) 9.1 85 (2)
  103 (2) 106 (2) 103 (2) 9 84 (2)
  102 (2) 105 (2) 102 (2) 8 83 (2)
  101 (2) 104 (2) 101 (2) 7.1 82 (2)
  100 (2) 103 (2) 100 (2) 7 81 (2)
  99 (2) 102 (2) 99 (2) 6.1 80 (2)
  98 (2) 101 (2) 98 (2) 6 79 (2)
  97 (2) 100 (2) 97 (2) 5.1 78 (2)
  96 (2) 99 (2) 96 (2) 5 77 (2)
  95 (2) 98 (2) 95 (2) 4 76 (2)
  94 (2) 97 (2) 94 (2) 3.2 75 (1)
  93 (2) 96 (2) 93 (2) 3.1 74 (1)
  92 (2) 95 (2) 92 (2)   73 (1)
  91 (2) 94 (2) 91 (2)   72 (1)
  90 (2) 93 (2) 90 (2)   71 (1)
  89 (2) 92 (2) 89 (2)   70 (1)
  88 (1) 91 (2) 88 (1)   69 (1)
  87 (1) 90 (2) 87 (1)   68 (1)
  86 (1) 89 (2) 86 (1)   67 (1)
  85 (1) 88 (2) 85 (1)   66 (1)
  84 (1) 87 (2) 84 (1)   65 (1)
  83 (1) 86 (2) 83 (1)   64 (1)
  81 (1) 85 (2) 81 (1)   63 (1)
  80 (1) 84 (2) 80 (1)   62 (1)
  79 (1) 83 (2) 79 (1)   60 (1)
  18 82 (2) 78 (1)   58 (1)
  17 81 (2) 77 (1)   57 (1)
  16 80 (2) 76 (1)   56 (1)
  15 79 (2) 75 (1)   55 (1)
  14 78 (2) 74 (1)   54 (1)
  13 77 (2) 73 (1)   53 (1)
  12 76 (2) 72 (1)   52 (1)
    75 (2) 71 (1)   51
    74 (2) 70 (1)   50
    73 (2) 69 (1)   49
    72 (2) 68 (1)   48
    71 (2) 67 (1)   47
    70 (2) 66 (1)   46
    69 (2) 65 (1)   45
    68 (2) 64 (1)   44
    67 (2) 63 (1)   43
    66 (2) 62 (1)   42
    65 (2) 61 (1)   41
    64 (2) 60 (1)   40
    63 (2) 59 (1)   39
    62 (2) 58 (1)   38
    61 (1) 57   37
    60 (1) 56   36
    59 (1) 55   35
    58 (1) 54   34
    57 (1) 53   33
    56 (1) 52   32
    55 (1) 51   31
    54 (1) 50   30
    53 (1) 49   29
    52 (1) 48   28
    51 (1) 47   27
    50 (1) 46   26
    49 (1) 45   25
    48 (1) 44   24
    47 (1) 43   23
    46 (1) 42   22
    45 (1) 41   21
    44 (1) 40   20
    43 (1) 39   19
    42 (1) 38   18
    41 (1) 37   17
    40 (1) 36   16
    39 (1) 35   15
    38 (1) 34   12.1
    37 (1) 33   12
    36 32   11.6
    35 31   11.5
    34 30   11.1
    33 29   11
    32 28   10.6
    31 27   10.5
    30 26   10.0-10.1
    29 25   9.5-9.6
    28 24   9
    27 23    
    26 22    
    25 21    
    24 20    
    23 19    
    22 18    
    21 17    
    20 16    
    19 15    
    18 14    
    17 13    
    16 12    
    15 11    
    14 10    
    13 9    
    12 8    
    11 7    
    10 6    
    9 5    
    8 4    
    7      
    6      
    5      
    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
26.1                        
26.0 all 141 (2) 10 80 (2) 141 (2) 143 (2) 11 15.5 (1) 28 (2) 14.9 (1) 13.52 (2) 3.0-3.1 (2)
18.5-18.6   4.4.3-4.4.4 7 12.1     10   27 (2)     2.5 (1)
18.4   4.4   12         26 (2)      
18.3   4.2-4.3   11.5         25 (2)      
Show all
18.2   4.1   11.1         24 (2)      
18.1   4   11         23 (2)      
18.0   3   10         22 (2)      
17.6-17.7   2.3             21 (2)      
17.5   2.2             20 (2)      
17.4   2.1             19.0 (2)      
17.3                 18.0 (2)      
17.2                 17.0 (2)      
17.1                 16.0 (2)      
17.0                 15.0 (2)      
16.6-16.7 (3)                 14.0 (1)      
16.5 (3)                 13.0 (1)      
16.4 (3)                 12.0 (1)      
16.3 (3)                 11.1-11.2 (1)      
16.2 (3)                 10.1 (1)      
16.1 (3)                 9.2 (1)      
16.0 (2,3)                 8.2      
15.6-15.8 (2)                 7.2-7.4      
15.5 (2)                 6.2-6.4      
15.4 (2)                 5.0-5.4      
15.2-15.3 (2)                 4      
15.0-15.1 (2)                        
14.5-14.8 (2)                        
14.0-14.4 (2)                        
13.4-13.7 (2)                        
13.3 (1)                        
13.2 (1)                        
13.0-13.1 (1)                        
12.2-12.5 (1)                        
12.0-12.1 (1)                        
11.3-11.4 (1)                        
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. Partial support refers to severe implementation bugs that renders content inaccessible for many element types.

  2. Buttons are not accessible with display: contents applied. See issues for Chromium, Firefox, and WebKit

  3. HTML tables and nodes with ARIA roles directory, grid, treegrid, table, row, gridcell, cell, columnheader, tree, and treeitem are not accessible with display: contents applied. See WebKit bugs 239478, 239479, 239478, and 257458

Bugs

Resources

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