From fd4b3d238fefaf98882841a405737e8fa897218c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 8 Oct 2020 10:13:05 +0200 Subject: [PATCH] increase click area of clear filter button, add search icon --- .../web/css/themes/element/icons/search.svg | 3 +++ src/ui/web/css/themes/element/theme.css | 23 +++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 src/ui/web/css/themes/element/icons/search.svg diff --git a/src/ui/web/css/themes/element/icons/search.svg b/src/ui/web/css/themes/element/icons/search.svg new file mode 100644 index 00000000..1531c7ac --- /dev/null +++ b/src/ui/web/css/themes/element/icons/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/ui/web/css/themes/element/theme.css b/src/ui/web/css/themes/element/theme.css index 41a9b82f..f1109baa 100644 --- a/src/ui/web/css/themes/element/theme.css +++ b/src/ui/web/css/themes/element/theme.css @@ -136,22 +136,26 @@ button.utility.grid.on { } .FilterField { + background-image: url('icons/search.svg'); + background-repeat: no-repeat; + background-position: 8px center; background-color: #e1e3e6; + /* to prevent jumps when adding a border on focus */ + border: 1px solid transparent; border-radius: 16px; height: 32px; align-items: center; - padding: 0 8px; + padding-left: 30px; /* 8 + 14 (icon) + 8*/ box-sizing: border-box; } -.FilterField :not(:first-child) { - margin-left: 8px; -} - .FilterField:focus-within { border: 1px #e1e3e6 solid; background-color: white; } +.FilterField:focus-within button { + border-color: white; +} /*.FilterField:not(:focus-within) button { display: none; @@ -169,14 +173,15 @@ button.utility.grid.on { } .FilterField button { - width: 16px; - height: 16px; + width: 30px; /* 32 - 1 (top) - 1 (bottom) */ + height: 30px; /* 32 - 1 (top) - 1 (bottom) */ background-position: center; background-color: #e1e3e6; background-repeat: no-repeat; background-image: url('icons/clear.svg'); - border: none; + border: 7px solid transparent; /* 8 - 1 */ border-radius: 100%; + box-sizing: border-box; } .PreSessionScreen { @@ -210,7 +215,7 @@ button.utility.grid.on { margin-right: 8px; } -.LeftPanel .utilities :not(:first-child) { +.LeftPanel .utilities > :not(:first-child) { margin-left: 8px; }