Open thexeos opened 3 years ago
Duplicate of #4142
Okay, maybe not so quickly.
Also from MD spec:
Caution Long errors can wrap to multiple lines if there isn't enough space to clearly describe the error. In this case, ensure padding between text fields is sufficient to prevent multi-lined errors from bumping layout content.
So this would only need to apply to errors to comply with the specs.
Widespread problem. I combine hide-bottom-space prop with q-mb-.. spacing (smth like that :class="[inputError ? 'q-mb-xs' : 'q-mb-lg']". In this case, we have the dynamic height for the error slot.
Currently, when using
error-message
for QInput, we are limited by at most one line of text before we have to start adding margins, otherwise the error text will overlap the following elements. If we have dynamic error message which has to be displayed for different screen sizes, the task of keeping the bottom margin large enough, while avoiding an unnecessarily large blank gap becomes very difficult.Since Vue 3 drops support for IE11, Quasar v2 can benefit from CSS
fit-content
property. It is supported by 97% of active browsers at the time of writing.By using
max-width: fit-content
and no longer using absolute positioning with a transform, we can have the error message text be displayed on as many lines as needed without overlapping and more importantly without stretching the width of QInput itself.Here is a demo: https://codepen.io/thexeos/pen/wvdoEpK