-
Notifications
You must be signed in to change notification settings - Fork 17
/
light-reset.scss
247 lines (229 loc) · 3.66 KB
/
light-reset.scss
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
/**
* Light Reset
* ==================================================
* A light version of the reset stylesheet that provides a clean slate for styling
* and integration with CSS frameworks.
*/
/* Set font size adjustment for the entire document */
html {
-webkit-text-size-adjust: 100%; /* For WebKit browsers */
/* Smooth scroll behavior when an element within the container is focused */
&:focus-within {
scroll-behavior: smooth;
}
}
/* Basic styling for the body */
body {
text-size-adjust: 100%; /* Adjusts text size */
position: relative; /* Positions relative to parent elements */
width: 100%; /* Full width of the screen */
min-height: 100vh; /* Minimum height is the full visible height of the screen */
/* Font smoothing for better text rendering on macOS */
-moz-osx-font-smoothing: grayscale; /* For Firefox */
-webkit-font-smoothing: antialiased; /* For WebKit browsers */
text-rendering: optimizeSpeed; /* Optimizes text rendering for better performance */
}
/* Universal selector for all elements and pseudo-elements */
*,
::after,
::before {
box-sizing: border-box; /* Includes padding and border within element's width/height */
}
/**
* CSS Reset Tweaks
* Based on Eric Meyer's CSS Reset v2.0-modified (public domain)
* URL: http://meyerweb.com/eric/tools/css/reset/
*/
a,
abbr,
acronym,
address,
applet,
article,
aside,
audio,
b,
big,
blockquote,
body,
br,
button,
canvas,
caption,
center,
cite,
code,
col,
colgroup,
data,
datalist,
dd,
del,
details,
dfn,
div,
dl,
dt,
em,
embed,
fieldset,
figcaption,
figure,
footer,
form,
h1,
h2,
h3,
h4,
h5,
h6,
head,
header,
hgroup,
hr,
html,
i,
iframe,
img,
input,
ins,
kbd,
label,
legend,
li,
link,
main,
map,
mark,
menu,
meta,
meter,
nav,
noscript,
object,
ol,
optgroup,
option,
output,
p,
param,
picture,
pre,
progress,
q,
rb,
rp,
rt,
rtc,
ruby,
s,
samp,
script,
section,
select,
small,
source,
span,
strong,
style,
svg,
sub,
summary,
sup,
table,
tbody,
td,
template,
textarea,
tfoot,
th,
thead,
time,
title,
tr,
track,
tt,
u,
ul,
var,
video,
wbr {
margin: 0;
padding: 0;
border: 0;
vertical-align: baseline;
}
/* Normalize HTML5 elements for older browsers */
article,
aside,
details,
embed,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
object,
section {
display: block;
}
canvas,
iframe {
max-width: 100%;
height: auto;
display: block
}
/* Reset and normalize form inputs */
input:required,
input {
box-shadow: none;
}
/* Autofill styling for better compatibility */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 30px white inset;
}
/* Improve appearance of search inputs */
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration,
input[type=search]::-webkit-search-results-button,
input[type=search]::-webkit-search-results-decoration {
-webkit-appearance: none;
-moz-appearance: none;
}
input[type=search] {
-webkit-appearance: none;
-moz-appearance: none;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
textarea {
overflow: auto;
vertical-align: top;
resize: vertical;
}
input {
&:focus {
outline: none;
}
}
video {
background: #000;
}
/* Styling for multimedia elements */
audio,
img,
picture,
svg,
video {
max-width: 100%; /* Limits the maximum width of elements to 100% */
display: inline-block; /* Display elements as inline-blocks */
vertical-align: middle; /* Aligns vertically */
height: auto; /* Auto height to maintain aspect ratio */
}