Skip to content

Instantly share code, notes, and snippets.

@LeMiira
Created December 6, 2024 12:35
Show Gist options
  • Save LeMiira/3c357aae0b6b3a2f095e49718043b0d7 to your computer and use it in GitHub Desktop.
Save LeMiira/3c357aae0b6b3a2f095e49718043b0d7 to your computer and use it in GitHub Desktop.
Custom css style for elementor form checkbox
<style>
.elementor-form-fields-wrapper {
/* Style for normal state */
input[type="checkbox"] {
-webkit-appearance: none; /* Removes default checkbox style */
-moz-appearance: none;
appearance: none;
width: 16px;
height: 16px;
top: 3px;
display: inline-block!important;
border-radius: 3px; /* Rounded corners */
cursor: pointer;
outline: none;
background-color: #EBEBEB; /* White background */
position: relative;
}
/* Style for checked state */
input[type="checkbox"]:checked {
background-color: #2CC4BD; /* Purple background */
}
input[type="checkbox"]:checked::after {
content: ""; /* Add a checkmark or styling effect */
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 10px;
height: 10px;
background-color: white; /* White checkmark background */
border-radius: 2px; /* Rounded checkmark */
}
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment