You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the label for a custom file input is too long, it overflows the input.
A quick solution is to set label {overflow: hidden;}
However this presents a new problem when label {font-size: <1rem;}
You might ask why you would put such a long label if no one is going to see the whole thing anyway. But this use case can apply when the window is resized horizontally or a script is used which updates the label with the name of the selected file.
EDIT: Looks like best solution is to add the .text-truncate to the given label.
The text was updated successfully, but these errors were encountered:
When the label for a custom file input is too long, it overflows the input.
A quick solution is to set
label {overflow: hidden;}
However this presents a new problem when
label {font-size: <1rem;}
You might ask why you would put such a long label if no one is going to see the whole thing anyway. But this use case can apply when the window is resized horizontally or a script is used which updates the label with the name of the selected file.
EDIT: Looks like best solution is to add the
.text-truncate
to the given label.The text was updated successfully, but these errors were encountered: