Skip to content

Comment on Don’t use IDs in CSS selectors? (2011)parent

Comments

A case where the "only 1 instance" assumption can break is on a styleguide page, where you might want to include multiple instances of a singleton element to show it in different states, say for your #header for example.

Multiple elements w/ the same id will pick up css styles, though.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.