reset css로 배웠는데
요즘 실무에서는 modern-css-reset를 많이 쓴다고..?
알아두자
normalize.css보다 가볍고, 실제 필요한 요소만 잘 초기화/* modern-css-reset: https://github.com/hankchizljaw/modern-css-reset */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
}
body {
min-height: 100vh;
font-family: system-ui, sans-serif;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
input, button, textarea, select {
font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
#root, #__next {
isolation: isolate;
}
🔗 원본 출처: modern-css-reset GitHub
📁
reset.css같은 파일로 만들어서 맨 위에@import "./reset.css";해도 OK!
@import url("https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap");
/* modern reset */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
}
body {
min-height: 100vh;
font-family: "Kaushan Script", cursive, sans-serif;
}
/* 나머지 CSS 변수들, 스타일 넣기 */
:root {
--primary-color-1: hsl(21, 81%, 29%);
/* ... */
}
| 항목 | 설명 |
|---|---|
| ✅ Modern CSS Reset | 실무용, 간결하고 강력한 초기화 |
| ✅ 적용법 | 복붙 or reset.css로 따로 관리 |
| ✅ 장점 | 가볍고, 브라우저 호환성과 접근성에 강함 |