Screenshot should say it all. I'll temporarily add some margin to my theme but would be nice to know if that's bug from webforms part?

Screenshot of Bootstrap textarea not having margin

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hkirsman created an issue. See original summary.

hkirsman’s picture

Issue summary: View changes
jrockowitz’s picture

Project: Webform » Bootstrap
Version: 8.x-5.x-dev » 8.x-4.x-dev

Textareas are native Drupal form elements. This sounds like a Bootstrap CSS specific bug.

I am moving this to the Bootstrap issue queue and will follow it just in-case this is a Webform related issue.

hkirsman’s picture

For additional information, here's an example from Bootstrap: https://getbootstrap.com/docs/3.3/css/#forms-example
All inputs have form-group class.

Although version 4 example, also has form-group around textarea:
https://getbootstrap.com/docs/4.0/components/forms/#form-controls

hkirsman’s picture

Title: Why isn't there bottom margin on textarea with Bootstrap? » Why isn't there bottom margin on textarea with Bootstrap in Webforms?
markhalliwell’s picture

Title: Why isn't there bottom margin on textarea with Bootstrap in Webforms? » textarea form elements don't have form-group
Version: 8.x-4.x-dev » 8.x-3.x-dev

I took some time to step through the code. It appears that, in an effort to keep the text_format textarea styling together (the format select element and help text below CKEditor), a generalized exclusion of all textareas was added.

I'll commit a fix for this shortly.

markhalliwell’s picture

Status: Active » Fixed
FileSize
2.05 KB

  • markcarver committed 561510c on 8.x-3.x
    Issue #2935934 by hkirsman, markcarver: textarea form elements don't...
hkirsman’s picture

Woks and already in release. Thank you!

rpataca’s picture

Looks like this is working for type: textarea but not for type: text_format.

markhalliwell’s picture

Yes, because text_format has its own wrapper div. Adding it to a textarea inside it breaks the illusion of the bordered wrapper. That's what this entire issue was about.

rpataca’s picture

Gotcha. Is there a proposed solution for added that margin/spacing between text_format elements without custom css or a preprocessor?

text_format

markhalliwell’s picture

No. I suppose you could create a new issue to add margin-bottom to http://cgit.drupalcode.org/bootstrap/tree/starterkits/sass/scss/componen... now. Text formats are in their own wrappers, so http://cgit.drupalcode.org/bootstrap/tree/starterkits/sass/scss/_overrid... removes the margin-bottom that .form-group normally receives (edit: because it's always a ::last-child element)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.