Skip to content
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

Fix inconsistent background colors in code sections #6472

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

lsarni
Copy link
Contributor

@lsarni lsarni commented Oct 6, 2020

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#L44

And 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#L6

I 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):

image

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@tim-lai
Copy link
Contributor

tim-lai commented Oct 8, 2020

@lsarni Thanks for the PR! Please resolve merge conflicts, otherwise ready to go. Thanks.

@lsarni lsarni force-pushed the fix/background-color branch from 6999d67 to 3ed7ef5 Compare October 8, 2020 07:24
@lsarni
Copy link
Contributor Author

lsarni commented Oct 8, 2020

Thanks for reviewing it @tim-lai it should be fine now :)

@tim-lai tim-lai merged commit 1b11d5c into swagger-api:master Oct 8, 2020
mathis-m pushed a commit to mathis-m/swagger-ui that referenced this pull request Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent background colors in code sections
2 participants