wpt / css / css-backgrounds / background-clip / clip-text-transform.html

Status: PASS | Duration: 8ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-backgrounds/background-clip/clip-text-transform.html

<!DOCTYPE html>
<title>background-clip:text with CSS transforms</title>
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-4/#valdef-background-clip-text">
<link rel="match" href="clip-text-transform-ref.html">
<style>
body {
  font-size: 40px;
}
.transformed {
  transform: translateX(0);
}
.t {
  background: blue;
  background-clip: text;
  color: rgba(255,0,0,0.5);
}
</style>
<!-- Passes if all texts are purple. -->
<div class="t">Text1</div>
<div class="t transformed">Transformed2</div>
<div class="t">Text3</div>
<div class="t transformed">Transformed4</div>

/css/css-backgrounds/background-clip/clip-text-transform-ref.html

<!DOCTYPE html>
<title>background-clip:text with CSS transforms (reference)</title>
<style>
body {
  font-size: 40px;
}
.t {
  background: blue;
  background-clip: text;
  color: rgba(255,0,0,0.5);
}
</style>
<!-- Passes if all texts are purple. -->
<div class="t">Text1</div>
<div class="t">Transformed2</div>
<div class="t">Text3</div>
<div class="t">Transformed4</div>