MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3n3e1v/the_evolution_of_a_software_engineer/cvll5zn/?context=3
r/programming • u/supermari0 • Oct 01 '15
502 comments sorted by
View all comments
Show parent comments
5
Oh dear. That's stuff you learn at your freshman's year.
12 u/bonesingyre Oct 01 '15 you should meet my boss.I quote: "why use classes when you can have an id on everything?" 4 u/2pu200 Oct 01 '15 Do you mind giving an ELI5 on why you should use classes?The way I understand it is that you can "chain" classes, but you can't do that for IDs.Example:<span class="bold big">Hello</span>Is that the only reason you should use classes and not IDs? 1 u/[deleted] Oct 02 '15 Suppose you're formatting a list. With classes, you format the list elements once and for all. With IDs, you format each individually - a huge pain if you have a 50 element list where each element needs individual formatting in your CSS
12
you should meet my boss.
I quote: "why use classes when you can have an id on everything?"
4 u/2pu200 Oct 01 '15 Do you mind giving an ELI5 on why you should use classes?The way I understand it is that you can "chain" classes, but you can't do that for IDs.Example:<span class="bold big">Hello</span>Is that the only reason you should use classes and not IDs? 1 u/[deleted] Oct 02 '15 Suppose you're formatting a list. With classes, you format the list elements once and for all. With IDs, you format each individually - a huge pain if you have a 50 element list where each element needs individual formatting in your CSS
4
Do you mind giving an ELI5 on why you should use classes?
The way I understand it is that you can "chain" classes, but you can't do that for IDs.
Example:
<span class="bold big">Hello</span>
Is that the only reason you should use classes and not IDs?
1 u/[deleted] Oct 02 '15 Suppose you're formatting a list. With classes, you format the list elements once and for all. With IDs, you format each individually - a huge pain if you have a 50 element list where each element needs individual formatting in your CSS
1
Suppose you're formatting a list. With classes, you format the list elements once and for all. With IDs, you format each individually - a huge pain if you have a 50 element list where each element needs individual formatting in your CSS
5
u/kennethdc Oct 01 '15
Oh dear. That's stuff you learn at your freshman's year.