Add comment about reducing duplicate code

This commit is contained in:
Zekumoru Dragonhart 2022-07-10 11:22:32 +02:00
parent 4634b5f763
commit baea35d498
1 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,15 @@
font-size: 36px; font-size: 36px;
} }
/*
In the id selector 'four' below, we could have also
added a rule to set the font size to 24px.
However, since the elements 'Number 3' and 'Number 4'
in the HTML file share the same font size, we reused
the 'adjust-font-size' class above to help reduce
duplicate code.
*/
#four { #four {
background-color: hsl(120, 100%, 75%); background-color: hsl(120, 100%, 75%);
font-weight: bold; font-weight: bold;