I found a working version example with Font awesome 4.4.
However, once I tried to update it with the later version, say https://use.fontawesome.com/releases/v5.7.0/css/all.css
it doesn't work any more.
I also checked the unicode e.g. this uncheckbox in the document has changed compare to the css code below?! https://fontawesome.com/icons/square?style=regular
To make myself more confused, the Font awesome document says "Updated: Version 5.10.2", I am not able to change to different version to check if checkbox icon has the same unicode.
<!--Working if I use 4.4 provided in example-->
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href="style.css" rel="stylesheet" />
</head>
and
/*NOT working any more tested under version 5.7*/
.custom-fa input[type="checkbox"] {position:absolute;left:-999px;}
.custom-fa input[type="checkbox"]:focus + span{color:#46c0ef;}
.custom-fa label{cursor: pointer;}
.custom-fa label input[type="checkbox"] + span:before {
font-family: FontAwesome;
content: "\f096";
display: inline-block;
font-weight: 400;
font-style: normal;
font-size: 1.4em;
text-align:center;
letter-spacing: 6px;
}
.custom-fa label input[type="checkbox"]:checked + span:before { content: "\f046";letter-spacing: 3px; } /* checked icon */
.custom-fa label input[type="checkbox"]:indeterminate + span:before{content: "\f147";letter-spacing: 6px;}
Can someone please explain to me what is going on with different Font awesome versions and their unicodes?
How do I fix the code to work using the newer Font Awesome 5.7 or 5.10?