unset-val-002.html (1082B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Cascade: the "unset" value</title> 6 <link rel="author" title="Chris Rebert" href="http://chrisrebert.com"> 7 <link rel="help" href="http://www.w3.org/TR/css-cascade-3/#inherit-initial"> 8 <link rel="help" href="http://www.w3.org/TR/css-cascade-4/#inherit-initial"> 9 <link rel="match" href="reference/ref-filled-green-100px-square.xht"> 10 <meta name="assert" content="display:unset should be the same as display:initial since 'display' is not an inherited property. display:unset should be the same as display:inline since 'inline' is the initial value of 'display'."> 11 <style> 12 .square { 13 width: 100px; 14 height: 100px; 15 } 16 .green { 17 background-color: green; 18 } 19 .top { 20 position: absolute; 21 } 22 .fail { 23 background-color: red; 24 display: inline-block; 25 display: unset;/* initial, inline */ 26 } 27 </style> 28 </head> 29 <body> 30 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 31 32 <div class="top"><span class="square fail"></span></div> 33 <div class="green square"></div> 34 </body> 35 </html>