DEV Community

Discussion on: Reasons not to use IDs in CSS

Collapse
 
olafvolafka profile image
OlafVolafka

I feel it the same.

A little example:

  • we have some buttons on a page
  • we want all the buttons to have a border set (we use type selector)
  • then we want for a group of buttons to have a specific color (now we use class to select them)
  • finally we have two buttons having set e.g. unique fonts (in this case we use id to select those buttons with unique properties)