<% var testlist = []; var outers = [ ["inline-block", '
', '
ZZ'], ["float", '
', '
ZZ'], ["table-cell", '
', 'ZZ
']]; var middles = [ null, ["inline-block", '
', '
']]; var targets = [ ["block", '
HH
'], ["inline", 'HH'], ["block with borders", '
HHH
'], ["inline with borders", 'HHH']]; for (var outer of outers) { for (var middle of middles) { for (var target of targets) { var title = target[0]; var html = target[1]; if (middle) { title += " in " + middle[0]; html = middle[1] + html + middle[2]; } title = "Shrink-to-fit " + outer[0] + " with a child of orthogonal " + title; html = outer[1] + html + outer[2]; testlist.push([title, html]); } } } var min, limit, title; if (index < 0) { min = 0; limit = testlist.length; title = "Shrink-to-fit with orthogonal children" } else { min = index; limit = index + 1; title = testlist[index][0]; } %>CSS Writing Modes Test: <%= title %>

Test passes if the X-position of the left edge of the orange box and the right edge of the blue box are the same.

If script is enabled, there should be one or more PASS and no FAIL. <% for (var i = min; i < limit; ++i) { var test = testlist[i]; %>

<%= (i + 1) + ": " + test[0] %>

<%- test[1] %>
<% } %>