gauravmunjal84 / prj-rev-bwfs-dasmoto

0 stars 0 forks source link

Rather than using classes on your h2s, give them IDs! #4

Open jzhu01 opened 7 years ago

jzhu01 commented 7 years ago

Since the only thing changing between the h2s is the background color, and each color is unique to each section, I recommend using IDs instead of classes.

Seen here: https://github.com/gauravmunjal84/prj-rev-bwfs-dasmoto/blob/master/Dasmoto/resources/css/index.css#L23-L33

gauravmunjal84 commented 7 years ago

Hi Zhu,

This is again because i followed specificity order mentioned in one of the lessons, it mentioned to stay as less specific as possible, this makes it easier to override them in bigger context if required, because classes are less specific than ID's so i used classes.

jzhu01 commented 7 years ago

Hmm, it makes more sense to use IDs here because they are only used once and unique to each h2, like I mentioned. Just something to note for future reference!