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

Fixing inline code snippets so that they show up in dark theme #660

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

TIGHEDEV
Copy link
Contributor

PR Summary

Adding in a grey background colour to the code element so that regardless of whether the user is in light or dark theme there is a contrast in the text colour to the background so that it is visible in both themes.

Below are the screenshots of the fixed UI.

image

image

Screenshot below is how it used to appear in dark theme. The ".github/workflows" is clearly not visible in dark theme.

image

In the light theme the code snippets will now have a grey background surrounding the text. In my opinion this is good as most code snippets on the web use a background colour to differentiate the snippet from the rest of the text. Screenshot below is the original light theme without the changes of this PR. It is difficult to tell that the code snippet is different to any of the other surrounding text.

image

Link to the original issue: #629

PR Checklist

  • PR has a meaningful title
  • Summarized changes
  • This PR is ready to merge and is not Work in Progress
  • Link to a filed issue
  • Screenshot of UI changes (if PR includes UI changes)

@TIGHEDEV TIGHEDEV requested a review from samaea October 10, 2023 16:01
@TIGHEDEV TIGHEDEV linked an issue Oct 10, 2023 that may be closed by this pull request
@pjlewisuk pjlewisuk self-requested a review October 11, 2023 09:42
Copy link
Contributor

@pjlewisuk pjlewisuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does changing the CSS alone not fix the problem for all <code> blocks in the helper? Why did you also have to add the style= parameter in the deployTab.js helper file?

Copy link
Contributor

@pjlewisuk pjlewisuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution Tighe, looks good to me now! Approved.

@pjlewisuk pjlewisuk merged commit fc29417 into main Oct 12, 2023
7 of 8 checks passed
@pjlewisuk pjlewisuk deleted the darkthemecodefix-tighe branch October 12, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In-line code snippets do not show up in dark mode
2 participants