반응형
css네이밍
-
네이밍 방법론 (케이스 스타일, 네이밍 컨벤션)HTML5_CSS3 2023. 4. 7. 12:33
CSS에서 스타일링을 하다보면, 클래스 이름을 무분별하게 작성하는 나를 발견한다. 최소한의 카멜케이스 또는 스네이스케이스를 사용한다거나, 의미 파악이 안되는 작명을 하지 않는다는 정도..? 👉 그러나 코드 일관성 유지 및 유지 보수와 함께 가독성을 위해서는 꼭 규칙에 맞게 작명을 해주는 습관이 좋다. 네이밍 / 작명에 대해 1) 케이스 스타일 1. 카멜 케이스 : 낙타의 모양을 따와 만든 표기법, ex) camelCase 2. 스네이스 케이스 : 뱀의 모양을 따와 만든 표기법, 띄어쓰기를 언더바 _ 로 연결해 표기 ex) snake_case 3. 케밥 케이스 : 케밥의 내용물이 연결된 모양을 따와 만든 표기법, 하이픈 - 으로 연결해 표 ex) kebab-case 4. 파스칼 케이스 : upper cam..