Last active
March 29, 2018 01:43
-
-
Save jetsloth/07824276e18153ac7dfa04a8aad931eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.image-choices-field { | |
display: block; | |
width: 100%; | |
} | |
.image-choices-field .gfield_label { | |
font-size: 2em; | |
margin-bottom: 1em; | |
display: block; | |
text-align: center; | |
} | |
.image-choices-field, | |
.gform_wrapper .gfield.image-choices-field { | |
margin-right: -10%; | |
} | |
.image-choices-field .image-choices-choice, | |
.gform_wrapper .gfield.image-choices-field li.image-choices-choice { | |
position: relative; | |
text-align: left; | |
vertical-align: middle; | |
transition: all 0.3s; | |
border-radius: 6px; | |
width: 100%; | |
overflow: visible; | |
padding: 30px; | |
border:none; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-focus { | |
padding: 30px; | |
pointer-events: none; | |
} | |
.image-choices-field .gfield_radio .image-choices-choice.image-choices-choice-focus.image-choices-choice-selected { | |
padding: 30px; | |
pointer-events: none; | |
} | |
.image-choices-field .image-choices-choice label, | |
.gform_wrapper .gfield.image-choices-field li.image-choices-choice label { | |
padding: 0 !important; | |
display: block; | |
border: none !important; | |
width: 100%; | |
} | |
.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: 15%; | |
top: 45%; | |
background-color: #ff584c; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-selected { | |
box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.2); | |
padding: 30px; | |
pointer-events: none; | |
background: #fff; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-selected:after { | |
color: #fff; | |
opacity: 1; | |
} | |
.image-choices-field .image-choices-choice, | |
.image-choices-field .image-choices-choice.image-choices-choice-hover, | |
.image-choices-field .image-choices-choice.image-choices-choice-selected { | |
padding: 30px; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-hover { | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-selected { | |
box-shadow: 0 0 40px 0 rgba(0,0,0,.1); | |
pointer-events: none; | |
} | |
.image-choices-field .image-choices-choice.image-choices-choice-selected:after { | |
bottom: -20px; | |
} | |
.image-choices-field .image-choices-choice-image-wrap { | |
border: none; | |
width: 30%; | |
display: inline-block; | |
float: left; | |
height: 250px; | |
background-color: transparent!important; | |
background-size: contain; | |
} | |
.image-choices-field.image-choices-show-labels .image-choices-choice-text { | |
font-size: inherit; | |
width: 70%; | |
display: inline-block; | |
transition: all 0.3s; | |
text-align: left; | |
padding-left: 20px; | |
top:50%; | |
transform: translateY(-50%); | |
position: absolute; | |
left: 30%; | |
padding: 0px 60px; | |
} | |
@media only screen and (max-width: 736px) { | |
.image-choices-field .image-choices-choice, | |
.gform_wrapper .gfield.image-choices-field li.image-choices-choice { | |
width: 48%; | |
margin-right: 2% !important; | |
} | |
} | |
@media only screen and (max-width: 480px) { | |
.image-choices-field .image-choices-choice, | |
.gform_wrapper .gfield.image-choices-field li.image-choices-choice { | |
width: 100%; | |
padding: 30px; | |
margin: 0px; | |
} | |
.image-choices-field .image-choices-choice-image-wrap, | |
.image-choices-field.image-choices-show-labels .image-choices-choice-text{ | |
width: 100%; | |
display: block; | |
padding: 0px; | |
transform: none; | |
top: 0; | |
left: 0; | |
position: relative; | |
margin-top: 20px; | |
text-align: center; | |
} | |
.image-choices-field .image-choices-choice:after { | |
left: 50%; | |
top: 25%; | |
transform:translateX(-50%); | |
} | |
} | |
/* | |
Find out more at | |
https://jetsloth.com/gravity-forms-image-choices/ | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment