summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-pseudo/first-line-change-inline-color.html
blob: 2a5be916b01d5d12eec1a4e81d912d95c7036916 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-line-pseudo">
<link rel="match" href="first-line-change-inline-color-ref.html">
<style>
  #block { color: green; }
  #block::first-line { color: blue; }
  .green { color: green; }
</style>
<div id="block">
  <div>
    <p>Blue <span id="target">This text should be green.</span> Blue</p>
  </div>
</div>
<script>
requestAnimationFrame(() => {
  requestAnimationFrame(() => {
    target.className = 'green';
    document.documentElement.removeAttribute('class');
  });
});
</script>
</html>