summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-fonts/size-adjust-text-decoration-tentative-ref.html
blob: 1cf10862ad60865a2095789625f104f9db7b4ba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<!-- Test is tentative due to the following issues:
   - https://github.com/w3c/csswg-drafts/issues/6112
   - https://github.com/w3c/csswg-drafts/issues/6114
-->
<title>Tests interaction between the size-adjust descriptor of @font-face and text decoration</title>

<style>
@font-face {
  font-family: custom-font;
  src: local(Ahem), url(/fonts/Ahem.ttf);
}

.target {
  margin: 20px;
  font-size: 10px;
  font-family: custom-font, sans-serif;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-color: black;
}
</style>

<p>size-adjust should not affect em- or percentage-based text-underline-offset.</p>

<!-- We fix thickness because the default thickness value 'auto' allows browser-specific behaviors. -->

<div class="target" style="text-underline-offset: 0.2em; text-decoration-thickness: 1px;">
  &#xC9;
</div>

<div class="target" style="text-underline-offset: 20%; text-decoration-thickness: 1px;">
  &#xC9;
</div>

<p>size-adjust should not affect em- or percentage-based text-decoration-thickness.</p>

<div class="target" style="text-decoration-thickness: 0.2em">
  &#xC9;
</div>

<div class="target" style="text-decoration-thickness: 20%">
  &#xC9;
</div>

<p>size-adjust should affect 'text-underline-thickness: from-font', which is a metric obtained from the font file. The underline should be 50% as thick as original.</p>
<div class="target" style="text-decoration-thickness: from-font">
  &#xC9;
</div>