[SASS] mixin 활용

Wontae·2020년 9월 6일
2

자주 사용하는 CSS 속성이 있다면 Sassmixin 기능을 활용할 수 있다.

@mixin flex($justify: null, $align: null, $direction: null) {
  display: flex;
  flex-direction: $direction;
  justify-content: $justify;
  align-items: $align;
}

div {
	@include flex(space-between);
    	// display: flex;
    	// justify-content: space-between;
}
profile
안녕하세요! 프론트엔드 개발자 정원태입니다.

4개의 댓글

comment-user-thumbnail
2020년 9월 6일

많이 배워갑니다!

1개의 답글
comment-user-thumbnail
2020년 9월 6일

알찬 내용이 정말 많군요!

답글 달기
comment-user-thumbnail
2020년 9월 8일

역시 어느때와 처럼 글이 날카롭습니다.

답글 달기