wpt / css / css-inline / text-box-trim / text-box-trim-pseudo-before-after-002.html

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

/css/css-inline/text-box-trim/text-box-trim-pseudo-before-after-002.html

<!DOCTYPE html>
<title>text-box-trim also trims the ":before" and ":after" pseudo elements</title>
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-trim">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-edge">
<link rel="match" href="text-box-trim-pseudo-before-after-002-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
.spacer {
  background: lightgray;
  block-size: 50px;
}
.target {
  font: 50px/2 Ahem;
  text-box-trim: trim-end;
  text-box-edge: text;
}
.target::before {
  content: "X";
  color: blue;
}
.target::after {
  content: "X";
  color: red;
}
</style>
<div class="spacer"></div>
<div class="target">
Aaa
<div class="spacer"></div>

/css/css-inline/text-box-trim/text-box-trim-pseudo-before-after-002-ref.html

<!DOCTYPE html>
<title>text-box-trim: trim-start is propagated to the last formatted line,
even if it's within a block-in-inline</title>
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-trim">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-edge">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
.spacer {
  background: lightgray;
  block-size: 50px;
}
.target {
  font: 50px/2 Ahem;
  height: 75px;
}
.target::before {
  content: "X";
  color: blue;
}
.target::after {
  content: "X";
  color: red;
}
</style>
<div class="spacer"></div>
<div class="target">
Aaa
<div class="spacer"></div>