Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: reading-flow with value grid-order on shadow host</title>
<link rel="author" title="Di Zhang" href="mailto:dizhangg@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src='../../resources/shadow-dom.js'></script>
<script src="../../resources/focus-utils.js"></script>
<style>
.wrapper {
display: grid;
reading-flow: grid-order;
}
</style>
<!-- Since B,A are inside a display: contents, they are visited together. -->
<!-- Since B has order 1, its display: contents parent is visited first. -->
<div class="test-case" data-expect="B,A,C"
data-description="Grid items in shadow host that is a display contents grid item">
<div class=wrapper>
<div style="display: contents">
<template shadowrootmode=open>
<slot></slot>
</template>
<button id="A" style="order: 2">A</button>
<button id="B" style="order: 1">B</button>
</div>
<button id="C" style="order: 3">C</button>
</div>
</div>
<script>
runFocusTestCases();
</script>