Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
            
- /css/css-fonts/font-face-sign-function.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<meta charset="utf-8" />
<title>CSS Test: Support for sign function in @font-face</title>
<link rel="match" href="font-face-weight-auto-static-ref.html">
<style>
  :root {
    font-size: 16px;
  }
  @font-face {
    font-family: "Lato";
    src: url('/fonts/Lato-Medium.ttf') format('truetype');
    font-display: swap;
    font-weight: calc(sign(1rem - 1px) * 400);
    font-width: calc(sign(1rem - 1px) * 100%);
  }
  .test {
    font-family: "Lato";
    font-size: 3em;
    font-weight: bold;
  }
</style>
<p class="test">text</p>