place-content-shorthand-004.html (1983B)
1 <!DOCTYPE html> 2 <title>CSS Box Alignment: place-content 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/#propdef-place-content" /> 5 <meta name="assert" content="Check that place-content'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-content", "align-content", "justify-content", value); 14 } 15 16 test(function() { 17 checkInvalidValues("center space-between 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("start baseline") 28 checkInvalidValues("end last baseline") 29 }, "Verify <baseline-position> values are invalid for the justify-content property"); 30 31 test(function() { 32 checkInvalidValues("10px end") 33 checkInvalidValues("start 10%") 34 }, "Verify numeric values are invalid"); 35 36 test(function() { 37 checkInvalidValues("auto") 38 checkInvalidValues("auto right") 39 checkInvalidValues("auto auto") 40 checkInvalidValues("start auto") 41 }, "Verify 'auto' values are invalid"); 42 43 test(function() { 44 checkInvalidValues("self-start") 45 checkInvalidValues("center self-end") 46 checkInvalidValues("self-end start") 47 }, "Verify self-position values are invalid"); 48 49 test(function() { 50 checkInvalidValues("") 51 }, "Verify empty declaration is invalid"); 52 </script>