I am currently working on creating a unique custom checkmark using FontAwesome in my project.
Below is the snippet of HTML and CSS style code that I am using:
.check {
font-size: 1.25rem;
cursor: pointer;
}
.check-unselected {
color: #4E444B
}
<div class="d-flex">
<i *ngIf="selected" (click)="selected = false;" class="fa fa-check-square purple-1 check"></i>
<i *ngIf="!selected" (click)="selected = true;" class="fa fa-square-o purple-1 check check-unselected"></i> {{ label }}
</div>
Currently, when I select and unselect the checkmark, the text moves slightly. It shifts to the right when selected and back to its original position when unselected. I am looking for a solution to keep the text static without any movement. Any suggestions on how to achieve this?
EDIT: The "purple-1" mentioned is only a color property and does not affect the size.