aboutsummaryrefslogtreecommitdiffstats
path: root/src/styles/base/_typography.scss
blob: c98533e547202d4627418edb351099649c79f146 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@use "../abstracts/functions" as fun;

p {
  font-size: var(--font-size-md);
  margin: 0 0 var(--spacing-sm);
}

small {
  font-size: var(--font-size-sm);
}

a {
  background: linear-gradient(to top, var(--color-primary) 50%, transparent 50%)
    0 0 / 100% 201% no-repeat;
  color: var(--color-primary);
  text-decoration-thickness: 0.15em;
  text-underline-offset: 20%;
  transition:
    all 0.3s linear 0s,
    text-decoration 0.18s ease-in-out 0s;

  &:hover {
    color: var(--color-primary-light);
    text-decoration-thickness: 0.25em;
  }

  &:focus {
    background-position: 0 100%;
    color: var(--color-fg-inverted);
  }

  &:active {
    background-position: 0 0;
    color: var(--color-primary-dark);
    text-decoration-thickness: 18%;
  }
}

button,
input,
optgroup,
select,
textarea {
  line-height: var(--line-height);
}

code,
kbd,
pre,
var {
  font-family: var(--font-family-mono);
}

:not(pre) > code,
kbd,
var,
samp {
  background: var(--color-bg-code);
  border: fun.convert-px(1) solid var(--color-border);
  border-radius: fun.convert-px(3);
  color: var(--color-primary-darker);
  font-style: normal;
  padding: fun.convert-px(2) fun.convert-px(5) fun.convert-px(1)
    fun.convert-px(5);
}

kbd {
  box-shadow: fun.convert-px(1) fun.convert-px(1) 0 fun.convert-px(1)
    var(--color-shadow);
}

pre {
  display: block;
  max-width: 100%;
  overflow: auto;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
}