-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreset.css
144 lines (124 loc) · 2.92 KB
/
reset.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
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
/*
> CUSTOM RESET of https://github.com/elad2412/the-new-css-reset
Plain CSS Version
*/
/* consistent font and removal of default styles */
input,
button,
textarea,
select {
all: unset;
/* display: revert; */
font: inherit;
box-sizing: border-box;
/* reverts outline for accessibility reasons */
/* &:focus-visible { */
/* outline: revert; */
/* } */
}
/* bring cursor back to pointer unset by declaration above */
button {
cursor: pointer;
}
/* https://blog.maximerouiller.com/post/remove-the-x-from-internet-explorer-and-chrome-input-type-search/ */
/* clears the 'X' on Internet Explorer */
input[type=search]::-ms-clear,
input[type=search]::-ms-reveal {
display: none;
width: 0;
height: 0;
}
/* clears the 'X' on Chrome */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
display: none;
}
/* remove default bullet/numbering on list */
ol,
ul,
menu {
list-style: none;
}
/* remove hyperlink defaults */
a {
text-decoration: none;
color: inherit;
}
/* scroll-behavior on HTML affects the view port when clicked through navigation */
html {
scroll-behavior: smooth;
}
/* ensure document is at least the same height of browser's innerHeight */
body {
min-height: 100%;
}
/* simple reset */
*,
*::before,
*::after {
padding: 0;
margin: 0;
box-sizing: border-box;
}
/* easy manipulation of elements */
img,
picture,
video,
canvas,
iframe,
svg {
/* removes line height as these are inline elements by default, and sets to block */
display: block;
/*
initial reset to prevent overflow on initial load
> best practice: to assign height="" and width="" in html
to prevent overflow then use css for final styling
* may require width: 100% if needed afterwards
*/
max-width: 100%;
}
/* removes spacing between cells in tables */
table {
border-collapse: collapse;
}
/* revert the 'white-space' property for textarea elements on Safari */
textarea {
white-space: revert;
}
/* revert for bug in Chromium browsers
- fix for the content editable attribute will work properly. */
:where([contenteditable]) {
-moz-user-modify: read-write;
-webkit-user-modify: read-write;
overflow-wrap: break-word;
/* -webkit-line-break: after-white-space; */
}
/* apply back the draggable feature - exist only in Chromium and Safari */
:where([draggable="true"]) {
-webkit-user-drag: element;
}
/* screen-reader only */
.sr-only {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal !important;
/* * below is a rule set from freecodecamp.org */
/* clip: rect(0, 0, 0, 0); */
/* white-space: nowrap; */
/* position: absolute; */
/* width: 1px; */
/* height: 1px; */
/* padding: 0; */
/* margin: -1px; */
/* overflow: hidden; */
/* border: 0; */
}