scss each in문(list, map)
//scss는 자바스크립트와 유사하게 number,string,boolean,color,list(배열),map(object개념) 이라는 개념들을 사용가능 //scss $number :1; $string:bold; $color: red; $boolean: true; $null : null; $list : orange, royalblue, yellow; $map: ( o:orange, r:royalblue, y:yellow); @each $c in $list{ .listbox{ color:$c; } } @each $k, $v in $map{ .mapbox-#{$k}{ color:$v; } } //css .listbox { color: orange; } .listbox { color: royalblue; } ..
scss 컬러내장함수
.box{ $color:royalblue; width:200px; height:200px; margin:20px; border-radius:10px; background-color:$color; &.built-in{ background-color:lighten($color,10%); &:hover{ background:darken($color,10%); } } &.built-in2{ background-color:mix($color,red); &:hover{ background:grayscale($color); } } } //saturte,grayscale,desaturate,lighten,darken,invert,rgba($color,0.5)..