$main-color: #fff;
.white {
color: $main-color;
}
/* 변수에 저장할 수 있는 Data Type */
/*
Color - rgb(100, 39, 153), hsl(0, 30%, 100%)
Number - 8.11, 12, 10px
String - "potato", "tomato", span
Boolean - true, false
null
*/
.parent {
font-size: 2rem;
.children {
font-size: 1.5em;
}
}
/* 속성 뒤에 : 를 추가함으로 nesting 할 수 있다. */
.parent {
font : {
familly: lato, sans-serif;
size: 14px;
decoration: none;
}
}
.parent {
padding: 30px;
background: #000;
color: #f00;
box-sizing: border-box;
}
.child {
@extend .parent;
color: #0f0;
}
@mixin content() {
background: #eeeeee;
padding: 20px;
border-radius: 5px;
max-width: 500px;
width: 100%;
margin: auto;
}
.my-content {
@include content()
}
VS Code Extension Settings
json 설정 참고 -
SCSS IntelliSense, snippet