wpt / css / selectors / selectors-4 / details-open-pseudo-002.html

Status: FAIL | Duration: 11ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/selectors/selectors-4/details-open-pseudo-002.html

<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>test for details:open pseudoclass</title>
<link rel="match" href="details-open-pseudo-001-ref.html">
<link rel="help" href="https://drafts.csswg.org/selectors-4/#open-state">

<style>
details {
  color: blue;
}
:open {
  color: green;
  margin-left: 5em;
}
</style>

<script>
function run() {
  document.querySelector("details").open = true;
  document.documentElement.classList.remove("reftest-wait");
}
</script>

<body onload="run()">

<p>The details element should be open, green, and indented:</p>

<details>
  <summary>Summary</summary>
  <p>Detailed content</p>
</details>

/css/selectors/selectors-4/details-open-pseudo-001-ref.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>reference for details:open pseudoclass</title>

<style>
details {
  color: green;
  margin-left: 5em;
}
</style>

<p>The details element should be open, green, and indented:</p>

<details open=true>
  <summary>Summary</summary>
  <p>Detailed content</p>
</details>