Skip to content

Instantly share code, notes, and snippets.

@cfxd
Created October 6, 2014 05:29
Show Gist options
  • Save cfxd/2ab3f4c375b1079df6f5 to your computer and use it in GitHub Desktop.
Save cfxd/2ab3f4c375b1079df6f5 to your computer and use it in GitHub Desktop.
Bootstrap 3 input group for Gravity Forms (only tested with 1 input field and 1 submit button)
/*
*
* Bootstrap 3 input group form for Gravity Forms
*
* Use with a class assigned to the form
* or on .gform to affect all Gravity forms
*
* Example 1 (affects targeted form class only): .my-form-class { &:extend(.gravity_form_input_group all); }
*
* Example 2 (affects all Gravity Forms): .gform { &:extend(.gravity_form_input_group all); }
*
*/
.gravity_form_input_group {
&, &_wrapper {
form {
&:extend(.input-group);
}
.gform_body input {
&:extend(.input-group .form-control, .input-group .form-control:first-child);
}
.gform_footer {
&:extend(.input-group-btn);
vertical-align: bottom;
input[type=submit], button[type=submit] {
&:extend(.input-group-btn > .btn, .input-group-btn:last-child > .btn);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment