Skip to content

Instantly share code, notes, and snippets.

@jetsloth
Created August 29, 2022 02:02
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/6e8bc64a166249bfd024952235f25f7b to your computer and use it in GitHub Desktop.
Save jetsloth/6e8bc64a166249bfd024952235f25f7b to your computer and use it in GitHub Desktop.
/*Variables - Change Colors here*/
:root {
--aqua-color: #9fe0dc;
--dark-aqua-color: #83c4c0;
--yellow-color: #f6c834;
}
/* Basic input styles */
.gform_wrapper.gravity-theme .demo4-box-layout input[type="text"],
.gform_wrapper.gravity-theme .demo4-box-layout input[type="email"],
.gform_wrapper.gravity-theme .demo4-box-layout input[type="tel"],
.gform_wrapper.gravity-theme .demo4-box-layout textarea {
border-radius:5px;
border:2px solid var(--dark-aqua-color);
height: 40px;
box-shadow:2.9px 3.3px 10px rgba(0, 0, 0, 0.035),23px 26px 80px rgba(0, 0, 0, 0.07);
text-indent:10px;
transition:all 0.3s ease-in-out;
}
/* Input Focus styles */
.gform_wrapper.gravity-theme .demo4-box-layout input[type="text"]:focus,
.gform_wrapper.gravity-theme .demo4-box-layout input[type="email"]:focus,
.gform_wrapper.gravity-theme .demo4-box-layout input[type="tel"]:focus,
.gform_wrapper.gravity-theme .demo4-box-layout textarea:focus {
border:2px solid var(--yellow-color);
outline: none;
transition:all 0.3s ease-in-out;
}
/*Make the textarea input smaller*/
.gform_wrapper.gravity-theme .demo4-box-layout .ginput_container_textarea textarea {
height: 150px;
}
/* Checkbox Styles */
.gform_wrapper.gravity-theme .demo4-box-layout input[type="checkbox"]{
appearance:none;
width:30px;
height:30px;
border:2px solid var(--dark-aqua-color);
background:white;
border-radius:5px;
box-shadow:2.9px 3.3px 10px
rgba(0, 0, 0, 0.035),23px 26px 80px rgba(0, 0, 0, 0.07);
margin: 0px 5px;
transition:all 0.3s ease-in-out;
}
/* Checkboxed Checked */
.gform_wrapper.gravity-theme .demo4-box-layout input[type="checkbox"]:checked {
background:var(--yellow-color);
}
/* Consent lable */
.demo4-box-layout .gfield_consent_label {
vertical-align: top;
}
/* Submit button */
.gform_wrapper.gravity-theme .demo4-box-layout input[type="submit"] {
background:var(--yellow-color);
appearance: none;
border: none;
padding: 18px 45px;
color: white;
font-weight: 900;
border-radius: 100px;
width: 50%;
transition:all 0.3s ease-in-out;
font-size:17px;
animation: wiggle 1.5s ease-in 2;
}
/* Submit button */
.gform_wrapper.gravity-theme .demo4-box-layout input[type="submit"]:hover {
background:var(--dark-aqua-color);
cursor:pointer;
}
/* Background Image */
.gform_wrapper.demo4-box-layout_wrapper {
background: url('https://gf.republiqstaging.com/wp-content/uploads/2022/08/mixkit-autumn-landscape-with-falling-leaves-87-original.png');
background-size: cover;
border-radius:20px;
display: flex;
flex-direction: row-reverse;
flex-wrap: nowrap;
justify-content: flex-start;
align-content: stretch;
align-items: flex-start;
overflow:hidden;
position: relative;
box-shadow:2.9px 3.3px 10px rgba(0, 0, 0, 0.035),23px 26px 80px rgba(0, 0, 0, 0.07);
}
.gform_wrapper.demo4-box-layout_wrapper:before {
content: "";
width: 100%;
position: absolute;
bottom: 0;
background-image: linear-gradient(180deg,rgba(0,0,0,0) 0%,rgb(0,0,0,0.4) 89%);
height: 100%;
z-index: 1;
}
/*Top left circle*/
.gform_wrapper.demo4-box-layout_wrapper:after {
content: "\279C";
width: 40px;
height: 30px;
position: absolute;
top: 40px;
right: 40px;
z-index: 1;
color: white;
font-size: 20px;
animation: pulse-animation-4 2s infinite;
border-radius: 100px;
background: var(--yellow-color);
margin: 0 auto;
text-align: center;
line-height: 28px;
}
/* Align form body to the right - change background colour here of form*/
.gform_wrapper form.demo4-box-layout {
background:var(--aqua-color);
width:50%;
order: 0;
flex: 0 1 auto;
align-self: stretch;
padding: 50px;
position: relative;
z-index:2;
animation: pulse-animation-form-4 3s infinite;
}
/*Form Heading*/
.gform_wrapper.demo4-box-layout_wrapper .gform_heading {
width:50%;
order: 0;
flex: 0 1 auto;
align-self: end;
padding:50px;
position: relative;
z-index:2;
}
/*Style the heading font*/
.gform_wrapper.demo4-box-layout_wrapper .gform_heading .gform_title {
color: white;
font-weight: 700;
line-height: 60px;
margin:10px auto;
display: inline;
background:var(--yellow-color);
word-wrap: break-word;
box-shadow: 10px 0 0 var(--yellow-color), -10px 0 0 var(--yellow-color);
font-family: system-ui,-apple-system,Segoe UI,Helvetica,Arial, sans-serif;
}
/*Form Description*/
.gform_wrapper.demo4-box-layout_wrapper .gform_heading .gform_description {
color: white;
font-weight: 600;
line-height: 20px;
display: block;
font-size:14px;
margin: 15px auto;
font-family: system-ui,-apple-system,Segoe UI,Helvetica,Arial, sans-serif;
}
/*CSS Animations*/
@keyframes wiggle {
0%, 7% {
transform: rotateZ(0);
}
15% {
transform: rotateZ(-13deg);
}
20% {
transform: rotateZ(9deg);
}
25% {
transform: rotateZ(-10deg);
}
30% {
transform: rotateZ(7deg);
}
35% {
transform: rotateZ(-2deg);
}
40%, 100% {
transform: rotateZ(0);
}
}
@keyframes pulse-animation-4 {
0% {
box-shadow: 0 0 0 0px var(--yellow-color);
}
100% {
box-shadow: 0 0 0 20px rgba(0, 0, 0, 0);
}
}
@keyframes pulse-animation-form-4 {
0% {
box-shadow: 0 0 0 0px white;
}
100% {
box-shadow: 0 0 0 20px rgba(0, 0, 0, 0);
}
}
/* Mobile Styles */
@media screen and (max-width: 769px){
.gform_wrapper.demo4-box-layout_wrapper {
display: flex;
flex-direction: column;
overflow:unset;
border-radius:10px;
}
.gform_wrapper.demo4-box-layout_wrapper .gform_heading {
padding: 40px;
}
.gform_wrapper.demo4-box-layout_wrapper .gform_heading,
.gform_wrapper form.demo4-box-layout {
width: 100%;
}
.gform_wrapper.demo4-box-layout_wrapper:after {
top: -14px;
left: 45%;
}
.gform_wrapper form.demo4-box-layout {
padding: 25px;
animation:unset;
}
.gform_wrapper.gravity-theme .demo4-box-layout input[type="submit"] {
width: 100%;
}
.gform_wrapper.demo4-box-layout_wrapper:after {
display:none;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment