<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.target {
  stroke: black;
  /*
  CSS transitions and animations for baseline-shift are broken unless a
  numerical underlying value is specified. See crbug.com/304007.
  */
  baseline-shift: 0;
}
.replica {
  stroke: green;
}
</style>
<body>
<template id="target-template">
  <!--
  We have to specify the target class on the text element because numerical
  values of baseline-shift are not inherited properly. See crbug.com/304006.
  -->
  <svg width="50" height="50">
    <text x="0" y="25" font-size="20" class="target">
      <tspan>T</tspan>T
    </text>
  </svg>
</template>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
  property: 'baseline-shift',
  from: '-10px',
  to: '10px'
}, [
  {at: -0.25, is: '-15px'},
  {at: 0, is: '-10px'},
  {at: 0.25, is: '-5px'},
  {at: 0.5, is: '0px'},
  {at: 0.75, is: '5px'},
  {at: 1, is: '10px'},
  {at: 1.25, is: '15px'},
]);
</script>
</body>

<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.target {
  stroke: black;
  /*
  CSS transitions and animations for baseline-shift are broken unless a
  numerical underlying value is specified. See crbug.com/304007.
  */
  baseline-shift: 0;
}
.replica {
  stroke: green;
}
svg:nth-child(2n) {
  margin-right: 10px;
}
</style>
<body>
<template id="target-template">
  <svg width="30" height="50">
    <!--
    We have to specify the target class on the text element because numerical
    values of baseline-shift are not inherited properly. See crbug.com/304006.
    -->
    <text x="0" y="25" font-size="20" class="target">
      <tspan>T</tspan>T
    </text>
  </svg>
</template>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
  property: 'baseline-shift',
  from: '-10px',
  to: '10px'
}, [
  {at: -0.25, is: '-15px'},
  {at: 0, is: '-10px'},
  {at: 0.25, is: '-5px'},
  {at: 0.5, is: '0px'},
  {at: 0.75, is: '5px'},
  {at: 1, is: '10px'},
  {at: 1.25, is: '15px'},
]);
</script>
</body>

Make baseline-shift-interpolation easier to eyeball
Make baseline-shift-interpolation easier to eyeball

Review URL: https://codereview.chromium.org/26597003

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@159749 bbb929c8-8fbe-4397-9dbb-9b2b20218538
