Skip to content

Commit

Permalink
fix for search dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mkb committed Oct 18, 2022
1 parent f8899e9 commit fb74b1f
Show file tree
Hide file tree
Showing 9 changed files with 553 additions and 469 deletions.
19 changes: 15 additions & 4 deletions 0.16.0 scss/_full-palette.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.theme-dark:not(.ctp-accent-blue, .ctp-accent-flamingo, .ctp-accent-green, .ctp-accent-lavender, .ctp-accent-maroon, .ctp-accent-mauve, .ctp-accent-peach, .ctp-accent-pink, .ctp-accent-red, .ctp-accent-rosewater, .ctp-accent-sapphire, .ctp-accent-sky, .ctp-accent-teal, .ctp-accent-yellow),
.theme-light:not(.ctp-accent-blue, .ctp-accent-flamingo, .ctp-accent-green, .ctp-accent-lavender, .ctp-accent-maroon, .ctp-accent-mauve, .ctp-accent-peach, .ctp-accent-pink, .ctp-accent-red, .ctp-accent-rosewater, .ctp-accent-sapphire, .ctp-accent-sky, .ctp-accent-teal, .ctp-accent-yellow) {
--blockquote-border-color: rgb(var(--ctp-lavender));
--color-accent: var(--ctp-rosewater);
--ctp-accent: var(--ctp-lavender);
--divider-color-hover: rgb(var(--ctp-blue));
--hr-color: rgb(var(--ctp-blue));
--indentation-guide-color: rgb(var(--ctp-surface1));
Expand Down Expand Up @@ -79,18 +79,29 @@
background-color: rgb(var(--ctp-lavender));
color: var(--text-on-accent);

& .suggestion-flair {
&:hover .suggestion-flair {
color: var(--text-on-accent);
}
}

/*
* Search
*/
.search-suggest-item.is-selected:not(.mod-group) {
background-color: rgb(var(--ctp-lavender));
.suggestion .suggestion-item.mod-group {
background-color: inherit;
color: var(--text-muted);
font-size: var(--font-ui-medium);
font-variant: all-small-caps;
}

.search-suggest-item.is-selected {
background-color: rgb(var(--ctp-accent));
color: var(--text-on-accent);

.list-item-part.clickable-icon {
color: var(--text-muted);
}

.search-suggest-info-text {
color: var(--text-on-accent);
}
Expand Down
3 changes: 2 additions & 1 deletion 0.16.0 scss/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
.workspace .mod-root .workspace-tabs.mod-stacked .workspace-tab-container,
.workspace-tab-header-inner-close-button:hover,
.workspace-tab-header.is-active .workspace-tab-header-inner-close-button:hover,
.workspace-tab-header-inner-close-button:hover {
.workspace-tab-header-inner-close-button:hover,
.suggestion :hover.list-item-part.clickable-icon[aria-label="Clear search history"] {
background-color: rgb(var(--ctp-red));
box-shadow: 0 0 0 1px rgb(var(--ctp-crust));
color: rgb(var(--ctp-base));
Expand Down
34 changes: 32 additions & 2 deletions 0.16.0 scss/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
color: var(--text-on-accent);
}

.search-suggest-item.is-selected:not(.mod-group) {
.search-suggest-item.is-selected {
background-color: rgb(var(--ctp-accent));
color: var(--text-on-accent);

Expand All @@ -12,11 +12,41 @@
}
}

.search-result-file-matched-text {
.suggestion .suggestion-item.mod-group {
background-color: inherit;
color: var(--text-muted);
font-size: var(--font-ui-medium);
font-variant: all-small-caps;
}

.search-suggest-item.is-selected {
background-color: rgb(var(--ctp-accent));
color: var(--text-on-accent);

.list-item-part.clickable-icon {
color: var(--text-muted);
}

.search-suggest-info-text {
color: var(--text-on-accent);
}
}

.list-item-part.clickable-icon:hover,
.list-item-part.clickable-icon:active {
background-color: rgb(var(--ctp-accent));
}

.search-result-file-match:hover {
background-color: rgb(var(--ctp-yellow));
color: var(--text-on-accent);
}

.search-result-file-match:hover .search-result-file-matched-text {
color: var(--text-on-accent);
}

.search-result-file-matched-text {
color: var(--text-on-accent);
}

Expand Down
4 changes: 2 additions & 2 deletions 0.16.0 scss/_shame.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ body {

/* Collapse icons */
--collapse-icon-color: var(--text-faint);
--collapse-icon-color-collapsed: var(--text-accent);
--collapse-icon-color-collapsed: var(--text-muted);

/* Cursor */
--cursor: default;
Expand Down Expand Up @@ -215,7 +215,7 @@ body {
--icon-m-stroke-width: 1.75px;
--icon-l-stroke-width: 1.75px;
--icon-color: var(--text-muted);
--icon-color-hover: var(--text-muted);
--icon-color-hover: var(--text-on-accent);
--icon-color-active: var(--text-accent);
--icon-color-focused: var(--text-normal);
--icon-opacity: 0.8;
Expand Down
4 changes: 2 additions & 2 deletions 0.16.0 scss/base.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@use "ctp-style-settings";
@use "shame";
@use "ctp-style-settings";
@use "full-palette";
@use "callouts";
@use "cmd-palette";
@use "full-palette";
@use "icons";
@use "search";
@use "settings";
Expand Down
2 changes: 2 additions & 0 deletions 0.16.0 scss/ctp-style-settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,5 @@ input[type="number"]:focus-visible {
text-decoration-line: none;
}
}


Binary file modified assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fb74b1f

Please sign in to comment.