HannahAurand / old-portfolio

Online Portfolio
0 stars 0 forks source link

tip: css class naming conventions #3

Open 0xZakk opened 6 years ago

0xZakk commented 6 years ago

You generally wont see class names using sentence-case or camel-case (or really any uppercase letters at all really). Instead, you'll often see multiword class names separated by hyphens (i.e. kabab-case or skewer-case).

A really common, more advanced naming convention that you could start to explore is called BEM. It stands for Block, Element, Modifier and is a really exact way of organizing and grouping elements. It's what you'll see most often in the industry. Here are two good articles on it:

  1. https://css-tricks.com/bem-101/
  2. https://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/

https://github.com/HannahAurand/hannahaurand.github.io/blob/588dcd3c9ab3d6fc2ac224b8646061 d63ffe30ce/index.html#L28

HannahAurand commented 6 years ago

Thanks, I will check out BEM! I'm just realizing that these issues exist (I'm sorry!!), I appreciate all your feedback on my code.