place-items-shorthand-004.html (1327B)
1 <!DOCTYPE html> 2 <title>CSS Box Alignment: place-items shorthand - invalid values</title> 3 <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> 4 <link rel="help" href="http://www.w3.org/TR/css3-align/#place-items-property" /> 5 <meta name="assert" content="Check that place-items's invalid values are properly detected at parsing time." /> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="/css/css-align/resources/alignment-parsing-utils.js"></script> 9 <div id="log"></div> 10 <script> 11 function checkInvalidValues(value) 12 { 13 checkPlaceShorthandInvalidValues("place-items", "align-items", "justify-items", value); 14 } 15 16 test(function() { 17 checkInvalidValues("center end start") 18 }, "Verify fallback values are invalid"); 19 20 test(function() { 21 checkInvalidValues("left") 22 checkInvalidValues("left start") 23 checkInvalidValues("right center") 24 }, "Verify 'left' and 'right' values are invalid for block/cross axis alignment"); 25 26 test(function() { 27 checkInvalidValues("10px left") 28 checkInvalidValues("right 10%") 29 }, "Verify numeric values are invalid"); 30 31 test(function() { 32 checkInvalidValues("") 33 }, "Verify empty declaration is invalid"); 34 </script>