mirror of https://github.com/luizdepra/hugo-coder.git

Robert Tucker
10.52.2023 6407a2039bca448ee0dee1f5fe8fddfe969ef03c
refs
author Robert Tucker <robertwtucker@gmail.com>
Tuesday, January 10, 2023 22:52 +0100
committer GitHub <noreply@github.com>
Tuesday, January 10, 2023 22:52 +0100
commit6407a2039bca448ee0dee1f5fe8fddfe969ef03c
tree 5837b710b1c426022a936f36144bc93ffbbaea00 tree | zip | gz
parent 473ff712bdbecc0f9727ffe1bab49135191f19d1 view | diff
fix: correct regression with code highlighting in dark mode (#760)

### Prerequisites

Put an `x` into the box(es) that apply:

- [x] This pull request fixes a bug.
- [ ] This pull request adds a feature.
- [ ] This pull request introduces breaking change.

### Description

This PR reverts a regression error in which the foreground color
specified for highlighted code is almost indistinguishable from the
white background used in dark mode.

This was originally fixed in 29a7a94 / #630 by assigning `color:
$fg-color` from the light scheme variables (resolves to `#212121`). In
476429d, the assignment was changed to `$fg-color-dark` (resolves to
`#dadada`) but this resulted in a color that is too close to the white
of the code highlight to be read easily. See image:

<img width="892" alt="SCR-20230107-rqc"
src="https://user-images.githubusercontent.com/11639356/211178462-f9c0fa4a-e29a-4a40-82ae-10580da2f112.png">

This fix assigns `$bg-color-dark` which resolves to `#212121` (same as
the original fix). With this change applied, the code is now legible:

<img width="899" alt="SCR-20230107-rol"
src="https://user-images.githubusercontent.com/11639356/211178461-10b64d47-4eeb-4959-9c87-59af94201e29.png">

### Issues Resolved

N/A

### Checklist

Put an `x` into the box(es) that apply:

#### General

- [x] Describe what changes are being made
- [x] Explain why and how the changes were necessary and implemented
respectively
- [ ] Reference issue with `#<ISSUE_NO>` if applicable

#### Resources

- [x] If you have changed any SCSS code, run `make release` to
regenerate all CSS files

#### Contributors

- [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already
2 files deleted
2 files added
2 files renamed
2 files modified
11 ■■■■ changed files
CONTRIBUTORS.md 1 ●●●● diff | view | raw | blame | history
assets/scss/_base_dark.scss 2 ●●● diff | view | raw | blame | history
resources/_gen/assets/scss/scss/coder-dark.scss_1fcd9040f1144c65015c77e7b93bc5ac.json 1 ●●●● diff | view | raw | blame | history
resources/_gen/assets/scss/scss/coder-dark.scss_e229566deac2466dcd73d10d2fe9546d.content 2 ●●● diff | view | raw | blame | history
resources/_gen/assets/scss/scss/coder-dark.scss_e229566deac2466dcd73d10d2fe9546d.json 1 ●●●● diff | view | raw | blame | history
resources/_gen/assets/scss/scss/coder.scss_38b4d05915c0483e6cb106e4f0efccbc.content 2 ●●● diff | view | raw | blame | history
resources/_gen/assets/scss/scss/coder.scss_38b4d05915c0483e6cb106e4f0efccbc.json 1 ●●●● diff | view | raw | blame | history
resources/_gen/assets/scss/scss/coder.scss_5e1eb8e37c42cdfb6215b61e44dcfa5f.json 1 ●●●● diff | view | raw | blame | history