- Issue created by @guido_s
- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 11:23pm 1 November 2023 - 🇦🇷Argentina tguerineau
Hello,
I've been working on addressing this issue and have created a MR with the necessary adjustments. Here's an overview of the changes:
1- Removed Exclusions: In the
bootstrap_barrio.theme
file, I've removed the lines that excluded select and textarea from floating labels support.2- Textarea Adjustments:
- Twig template updated: I modified the textarea twig template to adjust its height based on Bootstrap's recommendation. This will ensure a more consistent and visually appealing form design.
- Height Consistency: I've updated the textarea twig template to include a height of150px
. This ensures that textareas maintain a consistent height irrespective of whether the floating label feature is activated or not.
- Hook Preprocess for Textarea: I introduced a hook_preprocess_textarea in the theme file. This hook checks if the 'float_label' theme setting is enabled and accordingly sets a placeholder for the textarea. This placeholder is essentially the title of the textarea, making it intuitive for end-users.3 - Floating Labels for Select Inputs: Following the Bootstrap documentation, the
<label>
for.form-selects
is always displayed in its floated state. This caters to Bootstrap's specifications and ensures a unified design approach.Please review the changes and let me know if there are further adjustments needed.
- Open on Drupal.org →Core: 10.1.0-alpha1 + Environment: PHP 7.4 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - @tguerineau opened merge request.
- 🇧🇪Belgium mgstables
Have tested it on the contact form and the variable "float_label" is not addressed in "textarea.html.twig". So the style (150px) is not applied and the "text-wrapper" remains.