Skip to content

Instantly share code, notes, and snippets.

@jetsloth
Created November 26, 2019 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jetsloth/dcb2cd00868bc8c1a4b3c8b10f744aaf to your computer and use it in GitHub Desktop.
Save jetsloth/dcb2cd00868bc8c1a4b3c8b10f744aaf to your computer and use it in GitHub Desktop.
Image Choices style used in the Collapsible Sections - Custom Styles 2 demo
.image-choices-field {
max-width: 100%;
width: 90%;
display: block;
margin: 0 auto;
}
.image-choices-field .gfield_label {
font-size: 1.6em;
margin-bottom: 1.6em;
display: block;
}
.image-choices-field.no-label .gfield_label {
display: none;
}
.image-choices-field .image-choices-choice label {
border: 1px solid transparent;
}
.image-choices-field .image-choices-choice.image-choices-choice-focus label {
border-color: #847aff;
}
.image-choices-field .image-choices-choice:after {
content: "\2714";
width: 40px;
height: 40px;
overflow: hidden;
border-radius: 50%;
pointer-events: none;
opacity: 0;
transition: all .3s;
text-align: center;
line-height: 40px;
color: #fff;
display: block;
position: absolute;
left: 50%;
top: 60%;
margin: -20px 0 0 -20px;
background-color: #847aff;
}
.image-choices-field .image-choices-choice label {
padding: 0 !important;
display: block;
}
.image-choices-field .image-choices-choice,
.collapsible-demo-2_wrapper.gform_wrapper .gfield.image-choices-field li.image-choices-choice {
display: inline-block;
position: relative;
padding: 1px !important;
overflow: visible;
margin-bottom: 80px !important;
border: none;
transition: all 0.3s;
border-radius: 0;
width: 40%;
margin-left: 5% !important;
margin-right: 5% !important;
}
.image-choices-field .image-choices-choice,
.image-choices-field .image-choices-choice.image-choices-choice-hover {
background-color: transparent;
}
.image-choices-field .image-choices-choice:after {
content: "\2714" !important;
width: 40px;
height: 40px;
overflow: hidden;
border-radius: 50%;
pointer-events: none;
opacity: 0;
transition: all .3s;
text-align: center;
line-height: 40px;
color: #fff;
display: block;
position: absolute;
left: 50%;
top: 60%;
margin: -20px 0 0 -20px;
background-color: #847aff;
}
.image-choices-field .image-choices-choice label,
.collapsible-demo-2_wrapper.gform_wrapper .gfield.image-choices-field li.image-choices-choice label {
padding: 0 !important;
display: block;
}
.image-choices-field .image-choices-choice-image-wrap {
background-size: cover;
width: 100%;
height: auto;
padding-bottom: 100%;
}
.image-choices-field#field_22_13 .image-choices-choice-image-wrap {
background-size: contain;
}
.image-choices-field.image-choices-show-labels .image-choices-choice-text {
padding: 7px 13px;
margin: 0;
position: absolute;
width: 100%;
left: 50%;
transform: translateX(-50%);
border-radius: 20px;
bottom: -50px;
transition: all 0.3s;
}
.image-choices-field.image-choices-show-labels .image-choices-choice-text,
.image-choices-field.image-choices-show-labels .image-choices-choice-price {
font-size: inherit;
}
.image-choices-field .image-choices-choice.image-choices-choice-selected,
.image-choices-field .image-choices-choice.image-choices-choice-selected.image-choices-choice-hover {
/*box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.2);*/
background-color: transparent;
}
.image-choices-field .image-choices-choice.image-choices-choice-selected:after {
color: #fff;
opacity: 1;
top: 50%;
}
.image-choices-field .image-choices-choice.image-choices-choice-selected .image-choices-choice-text {
background-color: #847aff;
color: #fff;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment