Skip to content

Commit

Permalink
feat: overhaul search highlights 🎨
Browse files Browse the repository at this point in the history
The highlights now use a shade of cyan instead of boring gray.
  • Loading branch information
robertrossmann committed Apr 17, 2020
1 parent 8c03efc commit 5aebbbc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
21 changes: 10 additions & 11 deletions packages/generators/mkui.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function mkui({ ui, code }) {
* The Minimap shows a minified version of the current file.
*/
'minimap.background': ui.background.panel.hex(),
'minimap.findMatchHighlight': `${ui.highlight.word.current.hex()}44`,
'minimap.findMatchHighlight': `${ui.highlight.word.matches.hex()}44`,
'minimap.selectionHighlight': `${ui.text.primary.hex()}AA`,
'minimap.errorHighlight': ui.problems.error.hex(),
'minimap.warningHighlight': ui.problems.warning.hex(),
Expand Down Expand Up @@ -250,16 +250,16 @@ function mkui({ ui, code }) {
* Editor Colours
*/
'editor.background': ui.background.code.hex(),
'editor.findMatchBackground': `${ui.highlight.word.current.hex()}11`,
'editor.findMatchBorder': `${ui.highlight.word.current.hex()}44`,
'editor.findMatchHighlightBackground': `${ui.highlight.word.current.hex()}33`,
'editor.findMatchBackground': `${ui.highlight.word.matches.hex()}44`,
'editor.findMatchBorder': `${ui.highlight.word.matches.hex()}AA`,
'editor.findMatchHighlightBackground': `${ui.highlight.word.matches.hex()}33`,
'editor.findRangeHighlightBackground': `${ui.scm.added.hex()}22`,
'editor.foreground': ui.text.primary.hex(),
'editor.hoverHighlightBackground': `${ui.highlight.hover.hex()}11`,
'editor.lineHighlightBackground': `${ui.highlight.line.hex()}09`,
'editor.selectionBackground': `${ui.highlight.selection.hex()}22`,
'editor.selectionHighlightBackground': `${ui.highlight.selection.hex()}11`,
'editor.wordHighlightBackground': `${ui.highlight.word.current.hex()}11`,
'editor.wordHighlightBackground': `${ui.highlight.word.highlight.hex()}11`,
'editor.wordHighlightStrongBackground': `${ui.highlight.word.source.hex()}33`,
'editor.wordHighlightStrongBorder': `${ui.highlight.word.source.hex()}AA`,
'editorCursor.foreground': ui.text.primary.hex(),
Expand Down Expand Up @@ -288,9 +288,9 @@ function mkui({ ui, code }) {
// Overview Ruler
'editorOverviewRuler.border': ui.border.hex(),
'editorOverviewRuler.bracketMatchForeground': ui.text.primary.hex(),
'editorOverviewRuler.findMatchForeground': `${ui.highlight.word.current.hex()}66`,
'editorOverviewRuler.wordHighlightForeground': `${ui.highlight.word.current.hex()}66`,
'editorOverviewRuler.wordHighlightStrongForeground': ui.highlight.word.source.hex(),
'editorOverviewRuler.findMatchForeground': `${ui.highlight.word.matches.hex()}AA`,
'editorOverviewRuler.wordHighlightForeground': `${ui.highlight.word.matches.hex()}99`,
'editorOverviewRuler.wordHighlightStrongForeground': ui.highlight.word.matches.hex(),
'editorOverviewRuler.modifiedForeground': ui.scm.modified.hex(),
'editorOverviewRuler.addedForeground': ui.scm.added.hex(),
'editorOverviewRuler.deletedForeground': ui.scm.deleted.hex(),
Expand Down Expand Up @@ -358,11 +358,10 @@ function mkui({ ui, code }) {
'peekViewResult.fileForeground': ui.text.primary.hex(),
'peekViewTitleLabel.foreground': ui.text.primary.hex(),
'peekViewEditorGutter.background': ui.background.panel.hex(),
'peekViewEditor.matchHighlightBackground': `${ui.highlight.word.current.hex()}11`,
'peekViewEditor.matchHighlightBorder': `${ui.highlight.word.current.hex()}44`,
'peekViewEditor.matchHighlightBackground': `${ui.highlight.word.matches.hex()}22`,
'peekViewResult.background': ui.background.panel.hex(),
'peekViewResult.lineForeground': ui.text.primary.hex(),
'peekViewResult.matchHighlightBackground': `${ui.highlight.word.current.hex()}44`,
'peekViewResult.matchHighlightBackground': `${ui.highlight.word.matches.hex()}99`,
'peekViewResult.selectionBackground': `${ui.accent.hex()}99`,
'peekViewResult.selectionForeground': ui.text.primary.hex(),
'peekViewTitle.background': ui.background.panel.hex(),
Expand Down
3 changes: 2 additions & 1 deletion src/themes/bright/ui.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ const scm = {
const highlight = {
line: text.primary,
word: {
current: text.primary,
highlight: text.primary,
matches: normal.cyan,
source: accent,
},
selection: text.primary,
Expand Down
3 changes: 2 additions & 1 deletion src/themes/dark/ui.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ const scm = {
const highlight = {
line: text.primary,
word: {
current: text.primary,
highlight: text.primary,
matches: normal.cyan,
source: accent,
},
selection: text.primary,
Expand Down

0 comments on commit 5aebbbc

Please sign in to comment.