Andy Barnes
1 min readFeb 17, 2020

--

Hey, thanks for this. Some interesting ideas here!

A couple of thoughts about this approach.

  1. Using IDs usually raises red flags for component driven client side code, as you should only have unique IDs on the page. So if you wanted to repeat, say a blog card component, you’d start to have duplicated IDs on the page?
  2. You would also open yourself to inheritance issues, if say somewhere in the CSS/SASS you had .item { styles here } that may conflict with #wrapper.nav.link.item { styles here }, whereas nav__link-item should always be unique and not give you any future headaches :-).

--

--

Andy Barnes
Andy Barnes

Written by Andy Barnes

Front end developer who likes to design. Lover of technology, 80’s music and Dominic Toretto.

Responses (1)