Skip to content

Instantly share code, notes, and snippets.

Created November 10, 2016 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/bb598b378a2f662b95f507f069ed8339 to your computer and use it in GitHub Desktop.
Save anonymous/bb598b378a2f662b95f507f069ed8339 to your computer and use it in GitHub Desktop.
FontAwesome Checkbox CSS
#gform_wrapper_192 ul.gfield_checkbox li input[type=checkbox], #gform_wrapper_192 ul.gfield_radio li input[type=radio] {
visibility: hidden;
margin: 0;
width: 0!important;
}
#gform_wrapper_192 input[type=checkbox] + label,
#gform_wrapper_192 input[type=radio] + label { font-size: 20px; }
input[type=checkbox] + label:hover, input[type=radio] + label:hover { cursor: pointer; }
input[type=checkbox] + label:after, input[type=radio] + label:after {
font-family: "ETmodules";
font-size: 20px;
position: relative;
margin-right: 0.7em;
}
#gform_wrapper_192 li.gf_list_inline ul.gfield_checkbox li, #gform_wrapper_192 li.gf_list_inline ul.gfield_radio li {
display: -moz-inline;
display: inline;
}
#gform_wrapper_192 input[type=checkbox] + label:before {
content: '/f00c';
}
#gform_wrapper_192 input[type=checkbox] + label:hover:before {
content: '\f046';
filter: alpha(opacity=20);
opacity: 0.2;
}
#gform_wrapper_192 input[type=checkbox]:checked + label:before {
content: '\f046';
}
#gform_wrapper_192 input[type=checkbox]:checked + label:hover:before {
filter: alpha(opacity=100);
opacity: 1;
}
@tevyaw
Copy link

tevyaw commented Nov 11, 2016

Change line 11 to (this is the main problem - you're still calling the Divi font):
font-family: "FontAwesome";

Also, change all content calls to use quotes: " and start with a backslash: \ . So 25 should be:
content: "\f00c";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment