summaryrefslogtreecommitdiff
path: root/docs/inter-display.css
blob: 3a7354551639755c6827c780e657f7d5fb2a9244 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
layout: none
---
{% assign font_v = site.data.fontinfo[0].version %}
/*
Font families defined by this CSS:

- "InterDisplay"                  static "traditional" fonts for older web browsers
- "InterDisplay var"              single-axis variable fonts for all modern browsers
- "InterDisplay var experimental" multi-axis variable fonts for modern web browsers

Use like this in your CSS:

  h1,h2,h3,h4,h5,h6 { font-family: 'InterDisplay', sans-serif; }
  @supports (font-variation-settings: normal) {
    h1,h2,h3,h4,h5,h6 { font-family: 'InterDisplay var', sans-serif; }
  }

------------------------- static ------------------------- */
{% include InterDisplay-static.css %}

/* ----------------------- variable ----------------------- */

{%- comment -%}
{% include InterDisplay-italic.var.css %}
{% include InterDisplay-roman.var.css %}
{%- endcomment %}

@font-face {
  font-family: 'InterDisplay var';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('font-files/InterDisplay-roman.var.woff2?v={{font_v}}') format('woff2');
  font-named-instance: 'Regular';
}

@font-face {
  font-family: 'InterDisplay var';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('font-files/InterDisplay-italic.var.woff2?v={{font_v}}') format('woff2');
  font-named-instance: 'Italic';
}

/* ----------- experimental multi-axis variable -----------

Slant axis is not yet widely supported (as of February 2019) and thus this
multi-axis single-file variable font is opt-in rather than the default.
When using this, you will likely need to set font-variation-settings explicitly, e.g:
  * { font-variation-settings: "slnt" 0deg }
  .italic { font-variation-settings: "slnt" 10deg }
*/
{%- comment -%}
{% include InterDisplay.var.css %}
{%- endcomment %}

@font-face {
  font-family: 'InterDisplay var experimental';
  font-style: oblique 0deg 10deg;
  font-weight: 100 900;
  font-display: swap;
  src: url('font-files/InterDisplay.var.woff2?v={{font_v}}') format('woff2');
}