wpt / css / css-inline / text-box-trim / text-box-trim-accumulation-003.html

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

/css/css-inline/text-box-trim/text-box-trim-accumulation-003.html

<!DOCTYPE html>
<title>Test trimming both sides of the inline content</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">
<meta charset="utf-8">
<meta name="assert"
      content="text-box-trim values set by multiple ancestors accumulate instead
               of overwrite each other."
>
<link rel="match" href="text-box-trim-accumulation-003-ref.html">
<link rel="stylesheet" href="/fonts/baseline-diagnostic/baseline-diagnostic-font.css">
<style>
.spacer {
  block-size: 100px;
  background: lightgray;
}

.outer {
  text-box-trim: trim-end;
}

.middle {
  text-box-trim: trim-start;
  text-box-edge: ex alphabetic;
}

.inner {
  font: 100px/1 BaselineDiagnosticAlphabeticZero;
}
</style>
<div class="spacer"></div>
<div class="outer">
  <div class="middle">
    <div class="inner">█BxIF</div>
  </div>
</div>
<div class="spacer"></div>

/css/css-inline/text-box-trim/text-box-trim-accumulation-003-ref.html

<!DOCTYPE html>
<link rel="stylesheet" href="/fonts/baseline-diagnostic/baseline-diagnostic-font.css">
<meta charset="utf-8">
<style>
.spacer {
  background: lightgray;
  block-size: 100px;
}
.target {
  font: 100px/1 BaselineDiagnosticAlphabeticZero;
  margin-block-start: calc(-1em * var(--baseline-diagnostic-alphabetic-zero-x-height));
  margin-block-end: calc(-1em * (1 - var(--baseline-diagnostic-alphabetic-zero-alphabetic)));
}
</style>
<div class="spacer"></div>
<div class="target">█BxIF</div>
<div class="spacer"></div>