Skip to content

Commit baea35d

Browse files
committed
Add comment about reducing duplicate code
1 parent 4634b5f commit baea35d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

foundations/02-class-id-selectors/solution/solution.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
font-size: 36px;
1313
}
1414

15+
/*
16+
In the id selector 'four' below, we could have also
17+
added a rule to set the font size to 24px.
18+
19+
However, since the elements 'Number 3' and 'Number 4'
20+
in the HTML file share the same font size, we reused
21+
the 'adjust-font-size' class above to help reduce
22+
duplicate code.
23+
*/
1524
#four {
1625
background-color: hsl(120, 100%, 75%);
1726
font-weight: bold;

0 commit comments

Comments
 (0)