Skip to content

Instantly share code, notes, and snippets.

@MarwanShehata
Created March 27, 2024 07:13
Show Gist options
  • Save MarwanShehata/0de68ac750c1ce42c8a510485b63dbb8 to your computer and use it in GitHub Desktop.
Save MarwanShehata/0de68ac750c1ce42c8a510485b63dbb8 to your computer and use it in GitHub Desktop.
/*
Josh Comeau Reset https://www.joshwcomeau.com/css/custom-css-reset/ with my tweaks
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
* {
margin: 0;
}
html:focus-within {
scroll-behavior: smooth;
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeSpeed;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
font: inherit;
}
a {
text-decoration: none;
color: inherit;
}
a,
button {
cursor: pointer;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
ol,
ul {
list-style: none;
}
.visually-hidden {
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
-webkit-clip-path: inset(50%) !important;
clip-path: inset(50%) !important;
height: 1px !important;
overflow: hidden !important;
margin: -1px !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
white-space: nowrap !important;
}
@media (prefers-reduced-motion: reduce) {
html:focus-within {
scroll-behavior: auto;
}
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment