html, css

[css] BEM 사용하기

줌인. 2023. 7. 30. 17:11

*참고 링크 : https://css-tricks.com/bem-101/

 

BEM 101 | CSS-Tricks

The following is a collaborative post by guest Joe Richardson, Robin Rendle, and a bunch of the CSS-Tricks staff. Joe wanted to do a post about BEM, which we

css-tricks.com

 

*참고

1) __ : 정보, 해당 속성 내 어떤 정볼르 담는지를 설명

2) -- : modifier(수식어), 어떤 방식으로 만드는지를 설명

 

*해석

1) class : 버튼, 버튼은 파랑색이고, 버튼이 크다

   ex) big, blue

2) 내부적으로 : 가격을 적고, 텍스트도 적는다

  ex) text(=big button), price($4)

728x90