Skip to content

Build your personal knowledge base with Trilium Notes

fix(geomap): outline the whole search bar on focus, not the box inside it

Elian Doran91d2cc47b9bc
diff --git a/apps/client/src/widgets/collections/geomap/SearchBox.css b/apps/client/src/widgets/collections/geomap/SearchBox.css
index 7722301e43..ee188e3375 100644
--- a/apps/client/src/widgets/collections/geomap/SearchBox.css
+++ b/apps/client/src/widgets/collections/geomap/SearchBox.css
@@ -19,11 +19,18 @@ body.mobile .geo-map-container .geo-search-toolbar {
top: calc(var(--geo-map-inset-top) * 2 + var(--geo-map-toolbar-height));
}
+/* The bar is the field, icon and all, so it takes the focus outline an input group takes (see the
+ input group in theme-next/forms.css). Only Next names the colour. */
+.geo-map-container .geo-search-toolbar:focus-within {
+ outline: 3px solid var(--input-focus-outline-color, var(--main-border-color));
+ outline-offset: 0;
+}
+
.geo-map-container .geo-search-toolbar .geo-search-icon {
opacity: 0.7;
}
-/* The toolbar already frames the field, so drop the input's own border. */
+/* The toolbar already frames the field, so drop the input's own border and focus outline. */
.geo-map-container .geo-search-toolbar .geo-search-input {
width: 15rem;
max-width: 40vw;
@@ -34,6 +41,10 @@ body.mobile .geo-map-container .geo-search-toolbar {
box-shadow: none;
}
+.geo-map-container .geo-search-toolbar .geo-search-input:focus {
+ outline: none;
+}
+
.geo-map-container .geo-search-toolbar .geo-search-input::placeholder {
color: inherit;
opacity: 0.6;