Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why are css id selectors bad? #80

Closed
iffyuva opened this issue Jul 24, 2014 · 2 comments
Closed

why are css id selectors bad? #80

iffyuva opened this issue Jul 24, 2014 · 2 comments

Comments

@iffyuva
Copy link

iffyuva commented Jul 24, 2014

i was going through this: http://markdotto.com/2014/07/23/githubs-css/ and found this statement: "We’re aware of bad practices—over-nesting, IDs, elements, etc"

can you point to any good article/blog which throws light on this?

@mdo
Copy link
Owner

mdo commented Jul 24, 2014

They're not inherently bad, they're just bad for building reusable things in CSS because and ID means one thing. Classes are used so that you can reuse and extend without incurring overly specific CSS (and ID is more specific than a class). Plus, classes enable you to use an element more than once in a single page.

@mdo mdo closed this as completed Jul 24, 2014
@iffyuva
Copy link
Author

iffyuva commented Jul 24, 2014

thanks for making it clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants