From 100782d000e301c5c03a536935f8f3b2f37601f3 Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Wed, 18 Oct 2017 10:33:07 -0500 Subject: [PATCH 1/3] Use typeahead.js-bootstrap4-css --- .../Styles/DotVVM.Contrib.TypeAhead.css | 107 ++++++++++++------ 1 file changed, 70 insertions(+), 37 deletions(-) diff --git a/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css b/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css index 38382e01..63e334d8 100644 --- a/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css +++ b/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css @@ -1,53 +1,86 @@ -.typeahead { - background-color: #fff; -} +/* +The MIT License (MIT) -.typeahead:focus { - border: 2px solid #0097cf; -} +Copyright (c) 2014 Bass Jobsen -.tt-query { - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ -.tt-hint { - color: #999 +span.twitter-typeahead .tt-menu { + cursor: pointer; } -.tt-menu { - margin: 0; - padding: 8px 0; +.dropdown-menu, span.twitter-typeahead .tt-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 1rem; + color: #373a3c; + text-align: left; + list-style: none; background-color: #fff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - border-radius: 8px; - -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2); - -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2); - box-shadow: 0 5px 10px rgba(0,0,0,.2); + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 0.25rem; } -.tt-suggestion { +span.twitter-typeahead .tt-suggestion { + display: block; + width: 100%; padding: 3px 20px; - font-size: 18px; - line-height: 24px; + clear: both; + font-weight: normal; + line-height: 1.5; + color: #373a3c; + text-align: inherit; + white-space: nowrap; + background: none; + border: 0; } -.tt-suggestion:hover { - cursor: pointer; - color: #fff; - background-color: #0097cf; + span.twitter-typeahead .tt-suggestion:focus, .dropdown-item:hover, span.twitter-typeahead .tt-suggestion:hover { + color: #2b2d2f; + text-decoration: none; + background-color: #f5f5f5; + } + + span.twitter-typeahead .active.tt-suggestion, span.twitter-typeahead .tt-suggestion.tt-cursor, span.twitter-typeahead .active.tt-suggestion:focus, span.twitter-typeahead .tt-suggestion.tt-cursor:focus, span.twitter-typeahead .active.tt-suggestion:hover, span.twitter-typeahead .tt-suggestion.tt-cursor:hover { + color: #fff; + text-decoration: none; + background-color: #0275d8; + outline: 0; + } + +span.twitter-typeahead .disabled.tt-suggestion, span.twitter-typeahead .disabled.tt-suggestion:focus, span.twitter-typeahead .disabled.tt-suggestion:hover { + color: #818a91; } -.tt-suggestion.tt-cursor { - color: #fff; - background-color: #0097cf; + span.twitter-typeahead .disabled.tt-suggestion:focus, span.twitter-typeahead .disabled.tt-suggestion:hover { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)"; + } + +span.twitter-typeahead { + width: 100%; +} +.input-group span.twitter-typeahead { + display: block !important; } -.tt-suggestion p { - margin: 0; -} \ No newline at end of file + .input-group span.twitter-typeahead .tt-menu { + top: 2.375rem !important; + } From 53a4a75ccb3620ce27c8b802d97c4e9f36b170ea Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Wed, 18 Oct 2017 10:41:42 -0500 Subject: [PATCH 2/3] Add lighter hint color --- .../src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css b/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css index 63e334d8..bc91aa00 100644 --- a/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css +++ b/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css @@ -84,3 +84,7 @@ span.twitter-typeahead { .input-group span.twitter-typeahead .tt-menu { top: 2.375rem !important; } + +.tt-hint { + color: #888; +} \ No newline at end of file From 3fadbb2562d46f7d3d9117455a725b9086fa7f67 Mon Sep 17 00:00:00 2001 From: symbiogenesis <1724472+symbiogenesis@users.noreply.github.com> Date: Wed, 15 Nov 2017 10:07:30 -0600 Subject: [PATCH 3/3] Fix hover issue with hover background width --- .../src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css b/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css index bc91aa00..db58face 100644 --- a/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css +++ b/Controls/TypeAhead/src/DotVVM.Contrib/Styles/DotVVM.Contrib.TypeAhead.css @@ -36,7 +36,6 @@ span.twitter-typeahead .tt-menu { span.twitter-typeahead .tt-suggestion { display: block; - width: 100%; padding: 3px 20px; clear: both; font-weight: normal; @@ -87,4 +86,4 @@ span.twitter-typeahead { .tt-hint { color: #888; -} \ No newline at end of file +}