Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
            
- /css/css-align/default-alignment/place-items-shorthand-002.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<title>CSS Box Alignment: place-items shorthand - multiple values specified</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<meta name="assert" content="Check that setting two values to place-items sets the first one to 'align-items' and the second one to 'justify-items'." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/css-align/resources/alignment-parsing-utils.js"></script>
<div id="log"></div>
<script>
    let classes = Object.assign({"Normal":"normal", "Stretch":"stretch"}, selfPositionClasses, baselineClasses,
                                overflowClasses);
    for (var key1 in classes) {
        let alignValue = classes[key1];
        let classes2 = Object.assign({"Left":"left", "Right":"right"}, legacyClasses, classes);
        for (var key2 in classes2) {
           let justifyValue = classes2[key2];
           test(function() {
               checkPlaceShorhandLonghands("place-items", "align-items", "justify-items", alignValue, justifyValue);
           }, "Checking place-items: " + alignValue + " " + justifyValue);
        }
    }
</script>