Skip to content

Conversation

gordonwoodhull
Copy link
Contributor

@gordonwoodhull gordonwoodhull commented Apr 11, 2025

Currently we have a very bad bug with syntax highlighting in dark mode

image

This is because we no longer disable the light highlight stylesheet due to honoring the dark = light + dark convention.

The last commit in this PR fixes this by following the light, dark, light stylesheet pattern we are following for the main stylesheet.

I prefer this because it is consistent with our old behavior (except in nojs) and the other stylesheet. However, if others prefer a simpler approach, we could handle this case differently and disable the light highlight stylesheet instead.

The first commit is the tests, which fail on their own.

The second commit is the fixes to the highlighting styles, so that dark + light does not have the artifacts we saw for arrow, a11y

fixes #12399
fixes #12522

@gordonwoodhull gordonwoodhull force-pushed the bugfix/layer-highlight-light-dark-light branch from 534a02a to c902253 Compare April 14, 2025 19:17
@gordonwoodhull gordonwoodhull changed the title WIP: also add extra final highlight stylesheet fix wrong ordering of highlighting stylesheets for dark mode, and also nojs highlight bleeding Apr 14, 2025
@gordonwoodhull gordonwoodhull marked this pull request as ready for review April 14, 2025 20:22
these test some elements we saw bad behavior in nojs mode

also, a rather more severe bug where light highlighting is being applied
these more specific and bad highlight styles bleed through from dark to light mode

fixes #12399
fixes #12522
this fixes the light syntax highlighting being applied in dark mdoe

since we are no longer disabling the light stylesheet
use the same light, dark, light pattern as the main stylesheet
@gordonwoodhull gordonwoodhull force-pushed the bugfix/layer-highlight-light-dark-light branch from c902253 to 113e809 Compare April 15, 2025 04:36
@gordonwoodhull gordonwoodhull merged commit 31e496f into main Apr 15, 2025
49 checks passed
@gordonwoodhull gordonwoodhull deleted the bugfix/layer-highlight-light-dark-light branch April 15, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant