wpt / css / css-text / text-autospace / text-autospace-004.html

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

/css/css-text/text-autospace/text-autospace-004.html

<!DOCTYPE html>
<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<link rel="match" href="text-autospace-004-ref.html">
<style>
#container {
  writing-mode: sideways-lr;
}
.test {
  font-family: Ahem;
  font-size: 40px;
}
.normal {
  text-autospace: normal;
  /* These properties have no effect in sideways-* writing modes,
     so should not disable the auto-space insertion: */
  text-orientation: upright;
  text-combine-upright: all;
}
</style>
<div id="container">
  <div class="test normal">国国XX国</div>
  <div class="test normal">国。XX国</div>
  <div dir="rtl" class="test normal">国国XX国</div>
  <div dir="rtl" class="test normal">国。XX国</div>
</div>

/css/css-text/text-autospace/text-autospace-004-ref.html

<!DOCTYPE html>
<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
#container {
  writing-mode: sideways-lr;
}
.test {
  font-family: Ahem;
  font-size: 40px;
}
.no-autospace {
  text-autospace: no-autospace;
}
.spacing {
  margin: 5px;
}
.spacing-bottom {
  margin-bottom: 5px;
}
</style>
<div id="container">
  <div class="test no-autospace">国国<span class="spacing">XX</span>国</div>
  <div class="test no-autospace">国。XX<span class="spacing-bottom">国</span></div>
  <div dir="rtl" class="test no-autospace">国国<span class="spacing">XX</span>国</div>
  <div dir="rtl" class="test no-autospace">国。XX<span class="spacing-bottom">国</span></div>
</div>