From f462e7f93be83f213b73e0857ad6dee57262ac01 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Tue, 14 Jan 2025 01:30:31 +0200 Subject: [PATCH] style(next): add the initial style for input groups --- src/public/stylesheets/theme-next/forms.css | 46 +++++++++++++++++++++ src/public/stylesheets/theme-next/shell.css | 20 --------- 2 files changed, 46 insertions(+), 20 deletions(-) diff --git a/src/public/stylesheets/theme-next/forms.css b/src/public/stylesheets/theme-next/forms.css index 2e2676f75..a47ac7409 100644 --- a/src/public/stylesheets/theme-next/forms.css +++ b/src/public/stylesheets/theme-next/forms.css @@ -54,10 +54,56 @@ input::selection, color: var(--input-selection-text-color); } +/* Input groups */ + +.input-group { + outline: 3px solid transparent; + outline-offset: 6px; + background: var(--input-background-color); + border-radius: 6px; + padding-right: 8px; + color: var(--quick-search-color); +} + +.input-group:hover { + background: var(--input-hover-background); +} + +.input-group:focus-within { + outline: 3px solid var(--input-focus-outline-color); + outline-offset: 0; + background: var(--input-focus-background); + transition: outline-color 50ms linear, + outline-offset 200ms ease-out; +} + .input-group input +.input-group input:hover, .input-group input:focus, .input-group .form-control, +.input-group .form-control:hover, .input-group .form-control:focus { /* Ignore the focus outline for the inputs that are children of an input group */ outline: unset; + + background: transparent; +} + +.input-group button, +.input-group a { + display: flex; + --bs-border-width: 0; + --accented-background-color: transparent; + background: transparent; + padding: 0 4px; + + --muted-text-color: var(--input-text-color); +} + +.input-group a.disabled { + opacity: .5; +} + +.input-group .input-clearer-button { + background: transparent !important; } \ No newline at end of file diff --git a/src/public/stylesheets/theme-next/shell.css b/src/public/stylesheets/theme-next/shell.css index 78eeac63c..0b8fefbca 100644 --- a/src/public/stylesheets/theme-next/shell.css +++ b/src/public/stylesheets/theme-next/shell.css @@ -1209,10 +1209,6 @@ body .calendar-dropdown-widget .calendar-body a:hover { /* Search box wrapper */ .jump-to-note-dialog .input-group { margin-right: 16px; - background: var(--quick-search-background); - border: 2px solid transparent; - border-radius: 6px; - color: var(--quick-search-color); } .jump-to-note-dialog .input-group:hover { @@ -1226,22 +1222,6 @@ body .calendar-dropdown-widget .calendar-body a:hover { color: var(--quick-search-focus-color); } -/* Search box input */ -.jump-to-note-dialog .input-group input { - --bs-border-width: 0; - - box-shadow: unset; - background: transparent; - color: currentColor; -} - -/* Search box buttons */ -.jump-to-note-dialog .input-group button { - --bs-border-width: 0; - --accented-background-color: transparent; - padding: 0 4px; -} - .jump-to-note-dialog .input-group button:last-child { padding-right: 0.75em; }