Fix Sidebar Title Changing Margin Size Between Home Page and Others #487
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.
I noticed the home page side bar was repositioning items slightly when I moved from the home page to others. I had trouble finding the issue but realized it was the title (sidebar__introduction-title). On the homepage it's a h1 object and on others it's a div. I assume this is for SEO.
Both the H1 and DIV have the same CSS and same class - and even though they have the same margin of 1em, something is causing their margins to be computed differently. (For me h1 is 24px and div is 16pix).
A workaround for this was to keep both in a div with the same class, however when it's the home page wrap the a element in a h1 element while still keeping the div. I made sure the CSS styling removes the h1 elements margin while existing within the div too.
This keeps the positioning of sidebar objects consistent between pages.
Issue related: #486