justify-items-legacy-001.html (1244B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>CSS Box Alignment: legacy value for justify-items</title> 4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> 5 <link rel="help" href="https://drafts.csswg.org/css-align/#justify-items-property"> 6 <meta name="assert" content="Tests that legacy justify-items values are correctly inherited."> 7 <script src=/resources/testharness.js></script> 8 <script src=/resources/testharnessreport.js></script> 9 <style> 10 #container { 11 justify-items: legacy center; 12 } 13 </style> 14 <div id="container"><span id="child"></span></div> 15 <script> 16 test(function() { 17 assert_equals(getComputedStyle(child).justifyItems, "legacy center", 18 "default justify-items resolves to the parent justify-items value if legacy") 19 container.style.justifyItems = "legacy left"; 20 assert_equals(getComputedStyle(child).justifyItems, "legacy left", 21 "dynamic changes to justify-items propagate to children if needed (legacy)") 22 container.style.justifyItems = "left"; 23 assert_equals(getComputedStyle(child).justifyItems, "normal", 24 "dynamic changes to justify-items propagate to children if needed (left)") 25 }, "legacy value for justify-items") 26 </script>