-
Notifications
You must be signed in to change notification settings - Fork 83.8k
02-class-id-selectors: Change solution #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
02-class-id-selectors: Change solution #190
Conversation
Third and fourth elements share the same declaration for font-size.
574f345
to
4634b5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good change! Left one comment below
@@ -14,6 +14,5 @@ | |||
|
|||
#four { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is still relatively early and users may not have had a chance to gain an understanding of reducing code duplication, I think it would be worth adding a comment above the #four
block along the lines of "Instead of applying the adjust-font-size
class to this element in the HTML file, you could have also simply added a rule to the #four
selector to set the font size. Reusing the class on this element helps reduce duplicate code."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree as well because it isn't apparent that the class adjust-font-size
is meant to reduce code duplication and new users will miss it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay in review, but thanks for making this update!
…tion 02-class-id-selectors: Change solution
…tion 02-class-id-selectors: Change solution
Third and fourth elements share the same declaration of font-size.
Complete the following REQUIRED checkboxes:
location of change: brief description of change
format, e.g.01-flex-center: Update self check
Complete the following checkbox ONLY IF it is applicable to your PR. You can complete it later if it is not currently applicable:
1. Because:
The third and fourth element share the same declaration for font-size of 24px and since the formerly class 'oddly-cool' already declared it, I removed the same declaration from the 'fourth' id and use the new renamed class 'adjust-font-size' of 'oddly-cool' to the fourth element instead. Also, this refreshes the idea that you can put id and class in the same element.
2. This PR:
3. Additional Information: