Skip to content

Commit a6c0f42

Browse files
committed
SearchBar: Fix scrollbar position in default-layout controls
The `overflow-x: overlay` declaration is obsolete, since no browser (not even chrome) supports it anymore.
1 parent d359afa commit a6c0f42

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

asset/css/controls.less

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,6 @@
154154
}
155155

156156
> .search-controls > .search-bar .filter-input-area {
157-
label {
158-
&::after,
159-
input {
160-
padding: 0 .5em;
161-
}
162-
}
157+
--term-padding-v: 0px;
163158
}
164159
}

asset/css/search-base.less

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,15 @@ fieldset:disabled .term-input-area [data-drag-initiator] {
153153
// Layout
154154
.search-bar .filter-input-area,
155155
.term-input-area:not(.vertical) {
156+
--term-padding-v: .25em;
157+
--term-padding-h: .5em;
158+
156159
overflow: auto hidden;
157-
overflow-x: overlay; // Not invalid, but proprietary feature by chrome/webkit
158160
display: flex;
159161
flex-wrap: nowrap;
160162
width: 100%;
161-
height: ~"calc(2em + 10px)"; // Search bar height + approximate scrollbar height
163+
// input line-height + (input vertical padding * 2) + approximate scrollbar height
164+
height: ~"calc(20px + calc(var(--term-padding-v) * 2) + 10px)";
162165

163166
// Lets inputs grow based on their contents, Inspired by https://css-tricks.com/auto-growing-inputs-textareas/
164167
label {
@@ -170,7 +173,7 @@ fieldset:disabled .term-input-area [data-drag-initiator] {
170173
&::after,
171174
input {
172175
width: auto;
173-
padding: .25em .5em;
176+
padding: var(--term-padding-v) var(--term-padding-h);
174177
resize: none;
175178
}
176179

0 commit comments

Comments
 (0)