10. SCSS
vite + react + typescript + swc + scss 설치
npm create vite@latest my-app -- --template react-swc-tsnpm install -D sass기본 사용법
1. css file 의 확장자를 .scss 로 변경
2. link 역시 변경
<link rel="stylesheet" href="./index.scss" />3. Nesting
ul {
list-style-type: none;
padding: 0;
display: flex;
gap: 10px;
padding: 10px;
li {
background-color: tomato;
color: white;
padding: 10px;
border-radius: 7px;
a {
text-decoration: none;
color: white;
text-transform: uppercase;
}
&:hover {
opacity: 0.8;
a {
color: gray;
}
}
}
}4. mixin
5. mixin with content
6. mixin with midea query
Last updated