Closed gabbsmo closed 3 months ago
Thank you for that.
Fixed in in 2.4. 0
@StfBauer Looked more into this. It is certainly improved after your changes but I think it can be better. Having line height and padding based on rem while borders are in px creates some risk of rounding errors. While the outer box is stable now, I can still see the inner text of the input jump a little.
I propose that instead of changing the border and line height, we can add a outline outside the border. Something like this:
.hoo-input-text:focus {
line-height: 1.875rem; /* Restore non focused line-height */
padding: 0 0.5rem; /* Restore non focused padding. */
border: 1px solid var(--themePrimary); /* Probably only need the color change in PR */
outline: 1px solid var(--themePrimary); /* Adds thicker border, without changing the inner box dimensions */
}
.hoo-input-text:focus:invalid {
border: 1px solid var(--errorText);
outline: 1px solid var(--errorText);
}
input[type="search"].hoo-input-text:focus {
border-left: none;
}
The code above is a workaround of course. Can be more elegant in a real change.
Yeah not changing anything at this point in favor of going to Fluent 2.
Ok I understand. Noticed a few regressions in invalid fields and the search box so updated my code snippet to account for that.
Describe the bug When focusing a
hoo-input-text
input it get slightly higher, pushing down content below.To Reproduce Steps to reproduce the behavior:
<p>
or something below the inputExpected behavior Size of focused element should not change
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context You can workaround the bug by changing:
to: