Skip to content

Instantly share code, notes, and snippets.

@renanlara
Last active December 22, 2022 10:43
Show Gist options
  • Save renanlara/d75cf64e7cab12158afe to your computer and use it in GitHub Desktop.
Save renanlara/d75cf64e7cab12158afe to your computer and use it in GitHub Desktop.
Checkbox and Radio Button Custom - Contact Form 7
.wpcf7-checkbox, .radio {
display: block;
margin: 10px 0 0;
.wpcf7-list-item {
display: block;
input[type=checkbox], input[type=radio] {
display: none;
&:checked + .wpcf7-list-item-label::before {
content: "\f0c8";
color: #ffd400;
font-size: 9px;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
line-height: 14px;
text-decoration: inherit;
text-align: center;
}
}
}
.wpcf7-list-item-label {
display: inline-block;
font-family: "Arial", sans-serif;
font-size: 14px;
font-weight: normal;
left: 15px;
line-height: 14px;
margin: 0 0 15px;
position: relative;
&::before {
background: #ffffff;
border: 1px solid $000000;
border-radius: 3px;
content: "";
height: 15px;
left: -22px;
position: absolute;
width: 15px;
}
&:hover {
cursor: pointer;
}
}
}
.radio {
.wpcf7-list-item-label {
&::before {
border-radius: 100%;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment