docs(fix): Fix homepage by removing unclosed and unused <code> tags #2120
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.
Removed
<code>
tags that browsers like Chrome automatically close when parsing HTML resulting in styling inconsistencies (font-family)Why
I noticed some inconsistencies in styling on the React Spring home page. Investigation on why resulted in this patch.
Inconsistencies can be easily spotted by looking at the
@
in theimport
statements.What
Fixed examples on the home page of https://www.react-spring.dev in the "And there's even more" section.
Issue can be reproduced by hovering over the
Shorthand transformation styles
bullet point and comparing it by hovering over any other bullet point likeAnimate any value – strings, numbers, css variables...
The styling difference occurs because there is an unclosed
<code>
tag in the raw HTML fixtures inHomeBlockMore.tsx:50
which is automatically closed by browsers.The raw HTML is already enclosed in another
<code>
block by React resulting in a duplicate. This inner<code>
block also does not havefont-family: monospace
and uses the User Agent stylesheet instead.There is also a closing
</code>
tag in the previous fixture that is discarded by browsers as an extra closing tag so that was removed too.Checklist