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

Update search match colors in notebook and text document #6155

Merged
merged 5 commits into from Apr 2, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/codemirror-extension/schema/commands.json
Expand Up @@ -32,7 +32,7 @@
"type": "boolean",
"title": "Style Selected Text",
"description": "Value is boolean",
"default": false
"default": true
},
"selectionPointer": {
"type": ["boolean", "string"],
Expand Down
2 changes: 1 addition & 1 deletion packages/codemirror/src/editor.ts
Expand Up @@ -1244,7 +1244,7 @@ export namespace CodeMirrorEditor {
lineWiseCopyCut: true,
scrollPastEnd: false,
styleActiveLine: false,
styleSelectedText: false,
styleSelectedText: true,
selectionPointer: false,
rulers: [],
foldGutter: false
Expand Down
12 changes: 12 additions & 0 deletions packages/codemirror/style/index.css
Expand Up @@ -107,6 +107,18 @@ pre.CodeMirror-line {
margin-right: -5px;
}

.CodeMirror-selectedtext.cm-searching {
background-color: var(--jp-search-selected-match-background-color) !important;
color: var(--jp-search-selected-match-color) !important;
}

.cm-searching {
background-color: var(
--jp-search-unselected-match-background-color
) !important;
color: var(--jp-search-unselected-match-color) !important;
}

.CodeMirror-focused .CodeMirror-selected {
background-color: var(--jp-editor-selected-focused-background);
}
Expand Down
6 changes: 6 additions & 0 deletions packages/theme-dark-extension/style/variables.css
Expand Up @@ -374,4 +374,10 @@ all of MD as it is not optimized for dense, information rich UIs.
--jp-search-toggle-off-opacity: 0.5;
--jp-search-toggle-hover-opacity: 0.75;
--jp-search-toggle-on-opacity: 1;
--jp-search-selected-match-background-color: rgb(255, 225, 0);
--jp-search-selected-match-color: black;
--jp-search-unselected-match-background-color: var(
--jp-inverse-layout-color0
);
--jp-search-unselected-match-color: var(--jp-ui-inverse-font-color0);
}
6 changes: 6 additions & 0 deletions packages/theme-light-extension/style/variables.css
Expand Up @@ -371,4 +371,10 @@ all of MD as it is not optimized for dense, information rich UIs.
--jp-search-toggle-off-opacity: 0.4;
--jp-search-toggle-hover-opacity: 0.65;
--jp-search-toggle-on-opacity: 1;
--jp-search-selected-match-background-color: rgb(245, 200, 0);
--jp-search-selected-match-color: black;
--jp-search-unselected-match-background-color: var(
--jp-inverse-layout-color0
);
--jp-search-unselected-match-color: var(--jp-ui-inverse-font-color0);
}