-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
base.css
98 lines (81 loc) · 1.98 KB
/
base.css
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
*,
::before,
::after {
/* Prevent padding and border from affecting element width */
/* https://github.com/jensimmons/cssremedy/issues/4 */
box-sizing: border-box;
/* Allow adding a border with just a border-width */
/* https://github.com/tailwindlabs/tailwindcss/pull/116 */
border-width: 0;
border-style: solid;
}
html {
/* Prevent overflow in code blocks */
tab-size: 2;
/* Prevent overflow caused by long words if all other methods fail */
overflow-wrap: break-word;
/* Prevent erroneous text scaling in iOS Safari */
/* https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/ */
-webkit-text-size-adjust: 100%;
}
body {
/* Remove space around edges */
margin: 0;
}
hr {
/* Ensure visibility */
border-top-width: 1px;
}
pre {
/* Prevent overflow */
white-space: pre-wrap;
}
u {
/* Valid use cases are usually indicated by a wavy underline */
/* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u#usage_notes */
text-decoration-style: wavy;
}
/* https://github.com/jensimmons/cssremedy/issues/14 */
img,
iframe,
embed,
object,
video,
audio,
svg,
canvas {
/* Block display is usually what we want */
display: block;
/* Prevent overflow */
max-width: 100%;
/* Remove strange space-below when inline */
vertical-align: middle;
}
/* https://github.com/jensimmons/cssremedy/issues/14 */
img,
video,
svg {
/* Preserve aspect ratio when the height attribute is set */
height: auto;
}
audio {
/* Fill available space instead of using a fixed width */
width: 100%;
}
/* https://github.com/jensimmons/cssremedy/issues/39 */
table {
/* Prevent double borders */
border-collapse: collapse;
/* Use equal-width numerals */
font-variant-numeric: tabular-nums;
}
textarea {
/* Constrain resizing to the block direction */
resize: vertical;
resize: block;
}
[hidden]:not([hidden="until-found"]),
audio:not([controls]) {
/* Prioritize default behavior over custom styles above */
display: none;
}