npm install node-sass -save
- node-modules 폴더에 node-sass 폴더가 생성된다.
--save
: package.json에 설치된 패키지의 이름과 버전 정보를 업데이트// package.json
{
"name": "westagram-react",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"node-sass": "^4.14.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3"
}
}
nav {
}
nav ul{
}
nav ul li {
}
nav{
ul{
li{
}
}
}
$theme-color: blue;
@mixin flex-center {
display: flex;
justify-content: center;
align-items: center
}
login-container {
@include flex-center;
button {
width: 200px;
height: 100px;
background-color: $theme-color;
&:hover {
background-color: red;
cursor: pointer;
}
}
}