summaryrefslogtreecommitdiffstats
path: root/apps/web-shared/src/styles/custom-style/_typography.scss
blob: d0bb431f01f1391fa96222f6cb2f16994ab26ad0 (plain) (blame)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@use '../base' as *;

// --------------------------------

// (START) Global editor code https://codyhouse.co/ds/globals/typography

// --------------------------------

:root {
  // font family
  //--font-primary: Inter, system-ui, sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;

  // font size
  --text-base-size: 1.25rem; // body font-size
  --text-scale-ratio: 1.1; // multiplier used to generate the type scale values 👇
  
  // line-height
  --body-line-height: 1.2;
  --heading-line-height: 1.34;
  
  // capital letters - used in combo with the lhCrop mixin
  --font-primary-capital-letter: 1;

  // unit - don't modify unless you want to change the typography unit (e.g., from Rem to Em units)
  --text-unit: var(--text-base-size); // if Em units  --text-unit: var(--text-base-size);
}

:root, * {
  --text-xs: calc((var(--text-unit) / var(--text-scale-ratio)) / var(--text-scale-ratio));
  --text-sm: calc(var(--text-xs) * var(--text-scale-ratio));
  --text-md: calc(var(--text-sm) * var(--text-scale-ratio) * var(--text-scale-ratio));
  --text-lg: calc(var(--text-md) * var(--text-scale-ratio));
  --text-xl: calc(var(--text-lg) * var(--text-scale-ratio));
  --text-xxl: calc(var(--text-xl) * var(--text-scale-ratio));
  --text-xxxl: calc(var(--text-xxl) * var(--text-scale-ratio));
  --text-xxxxl: calc(var(--text-xxxl) * var(--text-scale-ratio));
}

body {
  font-family: var(--font-primary);
}

h1, h2, h3, h4 {
  font-family: var(--font-primary);
  --heading-font-weight: 600;
}

// font family
.font-primary { font-family: var(--font-primary); }

// --------------------------------

// (END) Global editor code

// --------------------------------

// link style
a, .link {}

mark {
  background-color: alpha(var(--color-accent), 0.2);
  color: inherit;
}

.text-component {
  --text-unit: 1em;
  --space-unit: 1em;
  --line-height-multiplier: 1;
  --text-space-y-multiplier: 1;

  blockquote {
    padding-left: 1em;
    border-left: 4px solid var(--color-contrast-lower);
    font-style: italic;
  }

  hr {
    background: var(--color-contrast-lower);
    height: 1px;
  }

  figcaption {
    font-size: var(--text-sm);
    color: var(--color-contrast-low);
  }
}

.article { // e.g., blog posts
  --body-line-height: 1.58; // set body line-height
  --text-space-y-multiplier: 1.2; // control vertical spacing
}