4 ms·
Context: I work on a large CMS powered site We have a company wide rule of no IDs in styles - we actually lint for them. As a front end team, we can't be certa
by breeny592 9y ago
Context: I work on a large CMS powered site
We have a company wide rule of no IDs in styles - we actually lint for them. As a front end team, we can't be certain that there will only ever be one of a component on a page at a time. Sometimes we can be mostly certain, but the content authors can theoretically do anything, and our job is to provide them flexibility whilst keeping the site looking good.
Modular CSS would be a God send for us, would be able to handle a lot of things much cleaner but sadly the current build of the CMS doesn't allow for it.
In small sites, or anything with static content, IDs are more than valid. But it becomes a lot harder when dynamic content, especially dynamic components, come into play.