summaryrefslogtreecommitdiff
path: root/scss/normalize.scss
blob: 0f7e02fc16796afbc2444dbe102a13965b29a617 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root,
html,
body,
main,
article,
section,
header,
footer,
button,
ol,
ul,
li,
dl,
dt,
dd,
p,
h1,
h2,
h3,
h4 {
  margin: 0;
  padding: 0;
}

/*
 * Prevent font size inflation
 * https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/
 */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
code, kbd, pre, samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */
abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */
b,
strong {
  font-weight: bolder;
}

small {
  font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */

@mixin baseline-adjustment {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  @include baseline-adjustment;
  bottom: -0.25em;
}

sup {
  @include baseline-adjustment;
  top: -0.5em;
}

@mixin form-control-reset {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
  text-transform: none; /* For buttons (Firefox, Edge) and selects (Firefox) */
}

:is(
  button,
  [type='button'],
  [type='reset'],
  [type='submit']
) {
  @include form-control-reset;
  text-transform: none;

  /**
   * Remove the inner border and padding in Firefox.
   */
  &::-moz-focus-inner {
    border-style: none;
    padding: 0;
  }

  /**
   * Restore the focus styles unset by the previous rule.
   */
  &:-moz-focusring {
    outline: 1px dotted ButtonText;
  }
}

input,
optgroup,
select,
textarea {
  @include form-control-reset;
}

/**
 * Corrects the display in Firefox and Edge.
 */
details {
  display: block;
}

/*
 * Add the correct display in all browsers.
 */
summary {
  display: list-item;
}