summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-align/self-alignment/place-self-shorthand-003.html
blob: a946ef3ed6ad453a532be8bfcc1f523d618a621d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<title>CSS Box Alignment: place-self shorthand - initial value</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="http://www.w3.org/TR/css3-align/#place-self-property" />
<meta name="assert" content="Check that place-self's 'initial' value expands to 'align-self' and 'justify-self'." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
    var div = document.createElement("div");
    document.body.appendChild(div);
    div.style["align-self"] = "start";
    div.style["justify-self"] = "end";
    div.setAttribute("style", "place-self: initial");

    test(function() {
        assert_equals(div.style["align-self"],
            "initial", "place-self specified value for align-self");
    }, "Check place-self: initial - align-self expanded value");

    test(function() {
        assert_equals(div.style["justify-self"],
            "initial", "place-self specified value for justify-self");
    }, "Check place-self: initial - justify-self expanded value");
</script>