wpt / css / css-inline / initial-letter / initial-letter-raise-initial.html

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

/css/css-inline/initial-letter/initial-letter-raise-initial.html

<!DOCTYPE html>
<title>Tests initial letter raise initial</title>
<link rel="author" title="Google LLC" href="https://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-inline/#raise-initial">
<meta name="flags" content="ahem">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" >
<link rel="match" href="initial-letter-raise-initial-ref.html">
<script src="resources/initial-letter-variants.js"></script>
<meta name="variant" content="?class=">
<meta name="variant" content="?class=no-ascent">
<meta name="variant" content="?class=no-descent">
<meta name="variant" content="?class=rtl">
<style>
    .sample {
        border: solid 1px green;
        font-family: Ahem;
        font-size: 20px;
        line-height: 24px;
        width: 230px;
    }

    .initial-letter::first-letter {
        initial-letter: 3 raise;
        color: lime;
        font-size: 100px;   /* should be ignored in rendering */
        line-height: 50px;  /* should be ignored in rendering */
    }

    .rtl {
        direction: rtl;
    }
</style>
</head>
<body>
<div class="sample initial-letter">
Abc<br>def<br>ghi<br>jkl<br>mno<br>
</div>

/css/css-inline/initial-letter/initial-letter-raise-initial-ref.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>Tests initial letter raise initial</title>
<link rel="author" title="Google LLC" href="https://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-inline/#raise-initial">
<meta name="flags" content="ahem">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" >
<script src="resources/initial-letter-variants.js"></script>
<style>
    .sample {
        border: solid 1px green;
        font-family: Ahem;
        font-size: 20px;
        line-height: 24px;
        width: 230px;
    }

    .fake-initial-letter {
        background: lime;
        float: left;
        --cap: 0.8;
        --size: calc((24px * 2 + 20px * var(--cap)) / var(--cap));
        height: var(--size);
        width: var(--size);
        margin-top: 2px;
    }

    .no-ascent .fake-initial-letter {
        height: calc(var(--size) * (1 - var(--cap)));
        margin-top: calc(var(--size) * var(--cap) + 2px);
    }
    .no-descent .fake-initial-letter {
        height: calc(var(--size) * var(--cap));
    }
    .rtl {
        direction: rtl;
        .fake-initial-letter {
            float: right;
        }
    }
</style>
</head>
<body>
<div class="sample">
<div class="fake-initial-letter"></div><br><br>
bc<br>def<br>ghi<br>jkl<br>mno<br>
</div>