Soften HTML search highlight colours#11
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Makes the HTML search-term highlight colours softer and lighter (pale pastels) while
keeping multiple terms distinguishable and text readable. Presentation only — no
change to match-finding, counts, ranking, or exported text content.
Changes (
save_results.py)#fff3b0, #d8f3dc, #dbeafe, #fde2e4, #f3e8ff, #ffe5d9, #e0f2fe, #fef9c3.--hiCSS variable: light#fff59d->#fff3b0; dark#4b5563->#fef9c3..highlightnow pins dark text (--hi-text: #111827) so pastels stay readable inboth light and dark themes, and replaces the bold + thick 2px underline with a
subtle
border-bottom: 1px solid rgba(0,0,0,0.15).New colours vs old
--hi(light/dark)Tests
python -m unittest discover -s tests -v-> 31 passed (OK)tests/test_html_highlight.py: highlight markup present, term text preserved,colours are from the pastel set (no legacy saturated colours), multiple terms keep
distinct colours.
Match logic
Untouched. Only CSS/style classes changed; no changes to how matches are found,
counted, ranked, or to the exported text.
Manual verification
_highlight_context_html('the contract amount was paid in full', ['contract','amount'])->
... <span class="highlight" style="background-color: #fff3b0;">contract</span> <span class="highlight" style="background-color: #d8f3dc;">amount</span> ...(distinct pale colours, dark text).