inheritance.html (1585B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Inheritance of CSS Flexible Box Layout properties</title> 6 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#property-index"> 7 <link rel="help" href="https://drafts.csswg.org/css-align/#property-index"> 8 <meta name="assert" content="Properties do not inherit, according to the spec."> 9 <meta name="assert" content="Properties have initial values according to the spec."> 10 <meta name="assert" content="align-content, align-items, justify-content have initial value 'normal' as specified in CSS Box Alignment."> 11 <script src="/resources/testharness.js"></script> 12 <script src="/resources/testharnessreport.js"></script> 13 <script src="/css/support/inheritance-testcommon.js"></script> 14 <style> 15 #container, #target { 16 display: flex; 17 } 18 </style> 19 </head> 20 <body> 21 <div id="container"> 22 <div id="target"></div> 23 </div> 24 <script> 25 assert_not_inherited('align-content', 'normal', 'center'); // initial value was "stretch" in flexbox-1 26 assert_not_inherited('align-items', 'normal', 'center'); // initial value was "stretch" in flexbox-1 27 assert_not_inherited('align-self', 'auto', 'stretch'); 28 assert_not_inherited('flex-basis', 'auto', '10px'); 29 assert_not_inherited('flex-direction', 'row', 'column'); 30 assert_not_inherited('flex-grow', '0', '2'); 31 assert_not_inherited('flex-shrink', '1', '3'); 32 assert_not_inherited('flex-wrap', 'nowrap', 'wrap-reverse'); 33 assert_not_inherited('justify-content', 'normal', 'center'); // initial value was "flex-start" in flexbox-1 34 assert_not_inherited('order', '0', '2'); 35 </script> 36 </body> 37 </html>