Skip to content

Instantly share code, notes, and snippets.

View jetsloth's full-sized avatar

JetSloth jetsloth

View GitHub Profile
@jetsloth
jetsloth / image-choices-auto-size-image.css
Created June 30, 2017 00:38
Gravity Forms Image Choices - auto sized image
.gfield.image-choices-field .image-choices-choice-image-wrap {
background-image: none !important;
height: auto;
}
.gfield.image-choices-field .image-choices-choice-image {
display: block;
margin: 0 auto;
}
@jetsloth
jetsloth / collapsible-sections-custom-styles-3.css
Last active July 20, 2017 07:06
Gravity Forms Collapsible Sections - Custom Styles 3
.form-has-collapsible-sections_wrapper {
margin: 0;
text-align: right;
width: 100%;
max-width: none;
}
.form-has-collapsible-sections {
display: inline-block;
width: 520px;
max-width: 100%;
@jetsloth
jetsloth / collapsible-sections-custom-styles-2.css
Last active July 20, 2017 07:06
Gravity Forms Collapsible Sections - Custom Styles 2
.form-has-collapsible-sections_wrapper {
margin: 0 auto;
text-align: left;
width: 460px;
max-width: 100%;
}
.form-has-collapsible-sections .gsection.collapsible-sections-field {
background-color: #fff;
border-color: #ededed !important;
@jetsloth
jetsloth / collapsible-sections-custom-styles-1.css
Last active July 20, 2017 07:06
Gravity Forms Collapsible Sections - Custom Styles 1
.form-has-collapsible-sections_wrapper {
margin: 0 auto 30px;
text-align: left;
width: 460px;
max-width: 100%;
}
.form-has-collapsible-sections {
border-radius: 5px;
background-color: #fff;
box-shadow: 0 0 50px 0 rgba(0, 0, 0, 0.15);
@jetsloth
jetsloth / gf-collapsible-section-field-title-inside-example.html
Last active July 20, 2017 09:58
Example markup of Collapsible Section field with section description within collapsible body
<li id="field_x" class="gfield gsection collapsible-sections-field collapsible-sections-description-inside">
<h2 class="gsection_title">Section Title</h2>
</li>
<div class="collapsible-sections-collapsible-body" id="collapsible-section_x">
<div class="gsection_description">Section Description</div>
<li id="field_x" class="gfield">
<label class="gfield_label" for="input_x">Field Label</label>
<div class="ginput_container">
<input name="input_x" id="input_x" type="text" value="" class="medium">
</div>
@jetsloth
jetsloth / gf-collapsible-section-field-description-title-example.html
Last active July 20, 2017 09:58
Example markup of Collapsible Section field with section description within section title bar
<li id="field_x" class="gfield gsection collapsible-sections-field collapsible-sections-description-title">
<h2 class="gsection_title">Section Title</h2>
<div class="gsection_description">Section Description</div>
</li>
<div class="collapsible-sections-collapsible-body" id="collapsible-section_x">
<li id="field_x" class="gfield">
<label class="gfield_label" for="input_x">Field Label</label>
<div class="ginput_container">
<input name="input_x" id="input_x" type="text" value="" class="medium">
</div>
@jetsloth
jetsloth / image-choices-gf_list-styles.css
Last active October 11, 2017 07:06
Gravity Forms Image Choices - List Classes Styling
.image-choices-field.gf_list_1col,
.image-choices-field.gf_list_2col,
.image-choices-field.gf_list_3col,
.image-choices-field.gf_list_4col,
.image-choices-field.gf_list_5col,
.gform_wrapper .gfield.image-choices-field.gf_list_2col,
.gform_wrapper .gfield.image-choices-field.gf_list_3col,
.gform_wrapper .gfield.image-choices-field.gf_list_4col,
.gform_wrapper .gfield.image-choices-field.gf_list_5col {
margin-right: -2% !important;
@jetsloth
jetsloth / image-choices-border-box-example.css
Created October 19, 2017 23:56
Custom CSS for a bordered box image choices based on first example at https://jetsloth.com/gravity-forms-image-choices/
.gform_wrapper .gfield.image-choices-field .image-choices-choice,
.image-choices-field .image-choices-choice {
padding: 5% 15px 6%!important;
border-radius: 9px;
box-shadow: inset 4px 4px 10px transparent, 4px 4px 10px transparent;
border: 3px solid rgba(0, 0, 0, 0);
width: 30%;
margin-left: 1% !important;
margin-right: 1% !important;
background-color: transparent;
.image-choices-field {
display: block;
width: 100%;
}
.image-choices-field .gfield_label {
font-size: 2em;
margin-bottom: 1em;
display: block;
text-align: center;
}
/* Global for both forms on page */
ul.gfield_radio li:not(:last-child), ul.gfield_checkbox li:not(:last-child),
.image-choices-field .image-choices-choice,
.image-choices-field .image-choices-choice .image-choices-choice-selected {
margin-right:0px!important;
border:none!important;
}
.gfield:not(:last-child) {
margin-bottom:0px!important;
}