Closed liuyi9509 closed 6 years ago
From @martoio on July 24, 2018 12:50
See how this code repeats 3 times for each h2?
h2
https://github.com/liuyi9509/Codecademy-SQL-intensive/blob/3fd7c7abc0d022b1c41e79cf61432a920a3f64b8/style.css#L12-L15
What happens if the client decides to change the font-size and the color for the h2s? All of a sudden you have to make 6 edits in your code, when in reality you are only changing 2 things. A better approach would be:
h2{ font-size:32px; font-weight:bold; color: white; } #brushes { background-color: mediumspringgreen; } #frames { background-color: lightcoral; } #paint { background-color: skyblue; }
Copied from original issue: liuyi9509/Codecademy-SQL-intensive#8
From @martoio on July 24, 2018 12:50
See how this code repeats 3 times for each
h2
?https://github.com/liuyi9509/Codecademy-SQL-intensive/blob/3fd7c7abc0d022b1c41e79cf61432a920a3f64b8/style.css#L12-L15
What happens if the client decides to change the font-size and the color for the
h2
s? All of a sudden you have to make 6 edits in your code, when in reality you are only changing 2 things. A better approach would be:Copied from original issue: liuyi9509/Codecademy-SQL-intensive#8