I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
Where I work, we use IDs for CMS content where our front end devs used to use style scoped to attach styles to customisations on elements, in preference to making a bunch of inline styles.
We use them in styling only because they're sometimes the only hooks we have from third-party modules or legacy CMS systems. This means that the CSS has a bunch of IDs in it already, and when a new developer starts, they tend to continue using them. I think wherever we do anything from scratch we use classes for everything style-related and data attributes for everything script-related.
Personally I'd prefer to use type selectors and document hierarchy first and classes second, but my voice is very small and hard to hear!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Where I use ID's in my CSS is if I want to support themes. This makes it easier to override colors and such.
That's a good idea - you can easily override existing class styles that way.
Where I work, we use IDs for CMS content where our front end devs used to use style scoped to attach styles to customisations on elements, in preference to making a bunch of inline styles.
We use them in styling only because they're sometimes the only hooks we have from third-party modules or legacy CMS systems. This means that the CSS has a bunch of IDs in it already, and when a new developer starts, they tend to continue using them. I think wherever we do anything from scratch we use classes for everything style-related and data attributes for everything script-related.
Personally I'd prefer to use type selectors and document hierarchy first and classes second, but my voice is very small and hard to hear!