From bcae5cc2ef20e6ca06dbd2d987c3a91a5c2c0341 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 25 Aug 2024 12:37:29 +0200 Subject: [PATCH] Fix 7142 search outline in chrome like browsers (#7317) * fix 7142 search outline in chrome like browsers * use moz-focusring only for FF, outline-initial for Chrome * moz-focusring remove outline-offset * remove box-sizing from base, because it's part of reset * remove redundant box-sizing since it is part of reset * fix distance between search input and first button to the right --- core/ui/AdvancedSearch/Standard.tid | 1 + core/ui/SideBarSegments/search.tid | 2 +- themes/tiddlywiki/vanilla/base.tid | 14 ++++++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/core/ui/AdvancedSearch/Standard.tid b/core/ui/AdvancedSearch/Standard.tid index e6ed18a7a..424d7917f 100644 --- a/core/ui/AdvancedSearch/Standard.tid +++ b/core/ui/AdvancedSearch/Standard.tid @@ -39,6 +39,7 @@ caption: {{$:/language/Search/Standard/Caption}} + <$reveal state="$:/temp/advancedsearch" type="nomatch" text=""> <$button class="tc-btn-invisible"> <> diff --git a/core/ui/SideBarSegments/search.tid b/core/ui/SideBarSegments/search.tid index 938cedfd1..690210307 100644 --- a/core/ui/SideBarSegments/search.tid +++ b/core/ui/SideBarSegments/search.tid @@ -55,7 +55,7 @@ tags: $:/tags/SideBarSegment <$macrocall $name="keyboard-driven-input" tiddler=<> storeTitle=<> selectionStateTitle=<> refreshTitle="$:/temp/search/refresh" type="search" tag="input" focus={{$:/config/Search/AutoFocus}} focusPopup=<> - class="tc-popup-handle" filterMinLength={{$:/config/Search/MinLength}} inputCancelActions=<> + class="tc-tiny-gap-right tc-popup-handle" filterMinLength={{$:/config/Search/MinLength}} inputCancelActions=<> inputAcceptActions=<> inputAcceptVariantActions=<> cancelPopups="yes" configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]"/> diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 8ad23e3a9..a32a9d9e5 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -71,10 +71,16 @@ $else$ {{$:/themes/tiddlywiki/vanilla/reset}} -*, input[type="search"] { - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; +input[type="search"] { + outline-offset: initial; +} + +button, textarea, input, select { + outline-color: <>; +} + +:-moz-focusring { + outline: 2px solid <>; } /*