Skip to content

Instantly share code, notes, and snippets.

@theJasonJones
Last active March 8, 2017 21:57
Show Gist options
  • Save theJasonJones/b46f8e2c476ac1b441ab13fedb2740ad to your computer and use it in GitHub Desktop.
Save theJasonJones/b46f8e2c476ac1b441ab13fedb2740ad to your computer and use it in GitHub Desktop.
Base Gravity Form Resets
@light-blue : #02a0df;
@black : #000;
.button( @color: @light-blue ) { .btn; border-radius: 0px; background-color: @color; color: #FFF; font-size: 16px; font-weight: bold; line-height: 28px; letter-spacing: .02em; text-transform: uppercase; padding: 6px 61px; .transition(background-color .4s ease);
&:hover, &:active, &:focus { background-color: darken(@light-blue, 10%); color: white; }
}
/*
* Labels and input on the same line with inline checkboxes and radios
*/
.gform_wrapper{
.ginput_container,.ginput_container_textarea { max-width: 100%; }
li { .clearfix(); position: relative; }
label { float: left; width: 25%;
@media( max-width: @screen-xs-max ){ float: none; width: 100%; }
}
input, select, textarea { width: 75%; float: left; color: @black; font-size:18px;
@media( max-width: @screen-xs-max ){ float: none; width: 100%; }
}
.gfield_radio, .gfield_checkbox{ .clearfix;
li { width: auto; float: left; }
label { display: inline-block; padding-top: 8px; margin-right: 20px; padding-left: 15px; }
input { box-shadow: none; width: auto; display: inline-block; padding-right: 10px; }
}
.btn-primary { .button; }
}
/*
* Label above inputs with inline checkboxes and radios
*/
.gform_wrapper{
.ginput_container,.ginput_container_textarea { max-width: 100%; }
.gfield_radio, .gfield_checkbox{ .clearfix;
li { width: auto; float: left; }
label { display: inline-block; padding-top: 8px; margin-right: 20px; padding-left: 15px; }
input { box-shadow: none; width: auto; display: inline-block; padding-right: 10px; position: relative; top: 10px; }
}
.ginput_container_date { position: relative;
img.ui-datepicker-trigger { position: absolute; top: 8px; left: 10px; }
input { padding-left: 40px; }
}
.btn-primary { .button; }
}
// Complex form elements (e.g. email confirmations, full address inputs)
.ginput_complex { .clearfix();
.ginput_left { width: 50%; float: left; padding-right: 25px; }
.ginput_right { width: 50%; float: left; }
input, select { margin-bottom: 20px; }
}
@theJasonJones
Copy link
Author

Be sure to include the Bootstrap LESS version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment