Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The changes look good! Just out of curiosity and so that I can grow better as a developer, what is the purpose of add var(--font-heading-scale)*1.3rem as opposed to just using 1.3rem? Is this a consistent pattern I should be using for font sizes as I noticed that other sections use this calculation for sizing as well.
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.
Sure! I wanted to match the
.h5
font size we use for the announcement bar text, so that they won't go out of sync. I didn't need to wrap it in the media query because the localization pickers in the header only show up above the750px
breakpoint anyway.We use this calc function to generate the font size so that when merchants adjust the font size scale in Theme Settings > Typography, that
var(--font-heading-scale)
variable will update and scale up all the text that uses these rules proportionally.(Ideally we should just be using a variable here, e.g.
var(--heading-font-size-h5)
rather than repeating that calc function over and over, but we haven't implemented something like that in Dawn.)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.
This was going to be my probably-don't-need-to-do-this-now feedback 🙂