Fix inconsistent background colors in code sections #6472
Merged
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.
Description
Change gray used as the background color of not highlighted code in order to match the one used by the theme used for highlighting.
As stated here we are using the theme
agate
for highlighting: https://github.com/swagger-api/swagger-ui/blob/master/src/core/components/highlight-code.jsx#L44And the background color used by this theme is
#333
as declared here https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/3204faac105256f8369aa4c691d54d49573c3a7a/src/styles/hljs/agate.js#L6I used
#333333
to make it more consistent to how the other colors are declared on the file.Motivation and Context
Fixes #6241
How Has This Been Tested?
Tested locally by executing one of the examples on the petstore file.
Screenshots (if appropriate):
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests