BEM

hrj2233·2021년 11월 6일
0

css architecture

목록 보기
1/1

설명

/* Block component */
.btn {}

/* Element that depends upon the block */ 
.btn__price {}

/* Modifier that changes the style of the block */
.btn--orange {} 
.btn--big {}

사용 예시

<a class="btn btn--big btn--orange" href="https://css-tricks.com">
  <span class="btn__price">$9.99</span>
  <span class="btn__text">Subscribe</span>
</a>

출처: https://css-tricks.com/bem-101/

0개의 댓글