From a0e6628757d3173fd000a7fa4f092e255df00653 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 8 Nov 2016 21:18:34 +0000 Subject: [PATCH] Tweak search box styling --- editor/js/ui/typeSearch.js | 2 +- editor/sass/search.scss | 40 +++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/editor/js/ui/typeSearch.js b/editor/js/ui/typeSearch.js index c29a43da7..7ce14e810 100644 --- a/editor/js/ui/typeSearch.js +++ b/editor/js/ui/typeSearch.js @@ -183,6 +183,7 @@ RED.typeSearch = (function() { dialog.css({left:opts.x+"px",top:opts.y+"px"}).show(); searchResultsDiv.slideDown(); setTimeout(function() { + searchResultsDiv.find(".red-ui-editableList-container").scrollTop(0); searchInput.focus(); },100); } @@ -208,7 +209,6 @@ RED.typeSearch = (function() { searchResults.editableList('empty'); searchInput.searchBox('value',''); selected = -1; - searchResults.parent().scrollTop(0); var common = { "debug" : false, "inject" : false, diff --git a/editor/sass/search.scss b/editor/sass/search.scss index 049aa8042..ea9b88596 100644 --- a/editor/sass/search.scss +++ b/editor/sass/search.scss @@ -52,16 +52,16 @@ .red-ui-search-results-container { display: none; height: 150px; - // position: absolute; - // top: 0; - // left:0; - // right: 0; - // bottom: 0; - // padding: 0; + .red-ui-editableList-container { + border: 1px dashed #aaa; + border-top: 1px solid #ccc; + } } .red-ui-search-result { - padding: 2px 2px 2px 5px; - font-size: 12px; + padding: 2px 2px 2px 5px; + font-size: 13px; + border-left-width: 2px; + border-right-width: 2px; } .red-ui-search-result-node { width: 18px; @@ -79,7 +79,6 @@ .red-ui-search-result-node-label { color: #999; } - } .red-ui-search-container { @@ -90,19 +89,21 @@ position:relative; height: 300px; padding: 5px; - background: $background-color; + background: #f9f9f9; + .red-ui-editableList-container { background: white; - border-radius: 2px; padding: 0; - background: $background-color; + background: #f9f9f9; li { padding: 0; - - &.selected .red-ui-search-result { - border-color: $primary-border-color; + &.selected { + background: #efefef; + .red-ui-search-result { + border-left-color:#999; + border-right-color:#999; + } } - } } } @@ -111,11 +112,14 @@ display: block; cursor: pointer; color: $form-text-color; - border: 2px solid white; + border-left: 3px solid #fff; + border-right: 3px solid #fff; &:hover { text-decoration: none; - border-color: $primary-border-color; color: $form-text-color; + background: #efefef; + border-left-color:#efefef; + border-right-color:#efefef; } &:after { content: "";