re: Reasons not to use IDs in CSS VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

No there's no reason you can't use classes everywhere for styling. Even if you think you'll only want to use a style once, there's no reason not to use a class for it. I can see why you would define "single-use" styles on the IDs but there isn't any advantage to doing that except for the higher specificity. I prefer to reserve IDs for other uses such as form labels and linking to anchor tags and keep all my styles defined by classes, for consistency.

code of conduct - report abuse