Clarify usage of .form-label
with .form-floating
#39971
-
Hi, According to the Migration guide of v5.0, "Form labels now require .form-label.". But when looking at the documentation page of Floating labels, no label use this class. I also encountered a bug with Readonly plaintext where if you change the <div class="form-floating">
<input type="text" class="form-control-plaintext" readonly value="my value" id="a-field">
<label class="form-label" for="a-field">My label</label>
</div> So now I'm totally confused. Should I report a bug for the issue above? Is the doc page missing the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @imagoiq
I'm not entirely sure whether this is an issue, it seems rather consistent and acceptable to have the label background visible here. |
Beta Was this translation helpful? Give feedback.
Hello @imagoiq
.form-label
are used for regular form controls (e.g. https://getbootstrap.com/docs/5.3/forms/form-control/). Floating labels are particular and don't require any extra.form-label
class since it's handled directly by.form-floating
put on the surrounding<div>
.I'm not entirely sure whether th…