paint-brush
Why IDs Can be Problematic in CSS by@marcoshdezcam
1,993 reads
1,993 reads

Why IDs Can be Problematic in CSS

by Marcos Hernández Campos9mJuly 11th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

IDs are unique, and classes are reusable, but they are not reusable. This rule may have encouraged the idea that using IDs can cause issues. IDs are highly specific and very powerful. They allow overriding styles added from frameworks and plugins without recurring to a long string of class names or!important declarations. It is fine to use IDs as long as you establish some guidelines to use them. Separate structure and skin. Separate container and content. Don't use location-dependent styles. Don’t use location dependent styles.

Company Mentioned

Mention Thumbnail
featured image - Why IDs Can be Problematic in CSS
Marcos Hernández Campos HackerNoon profile picture
Marcos Hernández Campos

Marcos Hernández Campos

@marcoshdezcam

L O A D I N G
. . . comments & more!

About Author

Marcos Hernández Campos HackerNoon profile picture
Marcos Hernández Campos@marcoshdezcam

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Frontendmentor
Com
Allella
Learnrepo
Learnrepo
Starbugs
Coffee-web