Skip to content

Instantly share code, notes, and snippets.

@nhogan411
Last active December 3, 2020 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nhogan411/d93f18a87680e7b81e6a0c9e30da178e to your computer and use it in GitHub Desktop.
Save nhogan411/d93f18a87680e7b81e6a0c9e30da178e to your computer and use it in GitHub Desktop.
swaps $brand-danger for theme-color('danger')
.gform_wrapper {
.gform_body {
ul.gform_fields {
@extend .row;
padding-left: 0 !important;
list-style-type: none;
li.gfield {
@extend .col-12;
padding-top: 10px;
padding-bottom: 10px;
&.gf_left_half,
&.gf_right_half {
@extend .col-md-6;
}
&.gf_left_third,
&.gf_middle_third,
&.gf_right_third, {
@extend .col-md-4;
}
&.gf_first_quarter,
&.gf_second_quarter,
&.gf_third_quarter,
&.gf_fourth_quarter, {
@extend .col-md-3;
}
&.gf_list_2col {
.gfield_radio,
.gfield_checkbox {
padding-left: 0;
grid-template-columns: repeat(2, 1fr);
column-gap: 3rem;
}
}
&.gf_list_3col {
.gfield_radio,
.gfield_checkbox {
padding-left: 0;
grid-template-columns: repeat(3, 1fr);
column-gap: 3rem;
}
}
&.gf_list_4col {
.gfield_radio,
.gfield_checkbox {
padding-left: 0;
grid-template-columns: repeat(4, 1fr);
column-gap: 3rem;
}
}
&.gf_list_5col {
.gfield_radio,
.gfield_checkbox {
padding-left: 0;
grid-template-columns: repeat(5, 1fr);
column-gap: 3rem;
}
}
&.gf_list_inline {
.gfield_radio,
.gfield_checkbox {
@extend .d-md-flex;
}
}
&.gf_list_2col,
&.gf_list_3col,
&.gf_list_4col,
&.gf_list_5col,
&.gf_list_inline {
.gfield_radio,
.gfield_checkbox {
@include media-breakpoint-down(md) {
display: grid;
grid-template-columns: 1fr;
padding-left: 3rem;
}
}
}
.ginput_recaptcha {
display: inline;
}
.gfield_label {
.gfield_required {
color: theme-color('danger');
}
}
ul.gfield_checkbox,
ul.gfield_radio {
display: grid;
li {
display: inline-flex;
padding-top: 5px;
padding-bottom: 5px;
input {
margin-top: 5px;
margin-right: 5px;
width: auto;
}
label {
width: auto;
}
}
}
.ginput_complex.ginput_container_name,
.ginput_complex.ginput_container_address {
@extend .row;
.name_first,
.name_last,
.address_city,
.address_state,
.address_zip,
.address_country {
@extend .col-12;
@extend .col-md-6;
margin: 0;
&:first-child {
@include media-breakpoint-down(md) {
margin-bottom: 1.5rem;
}
}
}
.address_line_1,
.address_line_2 {
@extend .col-12;
}
// if GF sublabels are above the fields, hide the primary label and make the sublabels look like normal labels
&.field_sublabel_above {
.gfield_label.gfield_label_before_complex {
display: none !important;
}
// might need to tweak these specific to the theme GF label styles
.ginput_complex.ginput_container_name {
.name_first label,
.name_last label {
font-weight: 700;
font-size: 1.6rem !important;
margin-top: 0;
margin-bottom: 0.5rem;
}
}
}
}
}
}
}
.gform_footer {
.button {
@extend .btn;
@extend .btn-primary;
@extend .btn-sm;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment