Skip to content

Commit 40ec9df

Browse files
committed
chore: style fix
1 parent 4268ecf commit 40ec9df

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

elements/pf-search-input/pf-search-input.css

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,14 @@
242242
border: none;
243243
text-align: left;
244244
border-radius: 0;
245+
padding-left: 3rem; /*Change it to variable*/
245246
}
246247

247248
#toggle-input {
248249
justify-content: space-between;
249250
min-width: calc(100% - 33px);
250251
box-sizing: border-box;
251-
max-height: 2.25rem;
252+
height: 2.25rem;
252253
}
253254

254255
.disabled #toggle-input {
@@ -278,6 +279,11 @@
278279
}
279280
}
280281

282+
.close-button-container{
283+
height: 2.25rem;
284+
width: 2.25rem;
285+
}
286+
281287
#toggle-text {
282288
flex: 1 1 auto;
283289
}
@@ -359,8 +365,17 @@ div.search-icon {
359365
border-bottom: var(--pf-global--spacer--xs, 0.125rem) solid var(--pf-theme--color--accent, #0066cc);
360366
}
361367
}
362-
#close-button {
363-
border-bottom: var(--pf-global--spacer--xs, 0.125rem) solid var(--pf-theme--color--accent, #0066cc);
368+
.close-button-container {
369+
position: relative;
370+
&::after{
371+
content: '';
372+
width: 2.25rem;
373+
height: var(--pf-global--spacer--xs, 0.125rem);
374+
bottom: 0px;
375+
left: -3px;
376+
background-color: var(--pf-theme--color--accent, #0066cc);
377+
position: absolute;
378+
}
364379
}
365380
}
366381

elements/pf-search-input/pf-search-input.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,17 @@ export class PfSearchInput extends LitElement {
186186
?disabled="${disabled}"
187187
@keydown=${this.#onSearchInput}
188188
placeholder="${placeholder}">
189-
<pf-button
190-
@click="${this.#OnClose}"
191-
?hidden="${this.#hideCloseButton()}"
192-
id="close-button"
193-
plain
194-
label="Close"
195-
>
196-
<pf-icon size="md" icon="close" set="patternfly">close</pf-icon>
197-
</pf-button>
189+
<div class="close-button-container">
190+
<pf-button
191+
@click="${this.#OnClose}"
192+
?hidden="${this.#hideCloseButton()}"
193+
id="close-button"
194+
plain
195+
label="Close"
196+
>
197+
<pf-icon size="md" icon="close" set="patternfly">close</pf-icon>
198+
</pf-button>
199+
</div>
198200
<button aria-label="toggle button" inert class="visually-hidden" id="toggle-button"></button>
199201
</div>
200202
<div

0 commit comments

Comments
 (0)