I have a checkbox that has an attribute value. I want to give a custom check like the image below. So when value="true" then the checkbox appears. I've coded like this but cannot work, can anyone help me?
.faktur-checkbox[value="true"] ~ .custom-control-label::after{
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e") !important;
background: no-repeat 65%/65% 65%;
top: 0;
}
.faktur-checkbox[value="true"] ~ .custom-control-label{
color:red;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css" integrity="sha512-GQGU0fMMi238uA+a/bdWJfpUGKUkBdgfFdgBm72SUQ6BeyWjoY/ton0tEjH+OSH9iP4Dfh+7HM0I9f5eR0L/4w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<div class="faktur-container checkbox-container">
<input type="checkbox" class="custom-control-input faktur-checkbox" value="true" name="faktur">
<label id="faktur-label" class="custom-control-label checkbox-label" for="faktur">Test</label>
</div>