I have vote(like) on my code on C# (ASP .NET Core) Now I want , when I click on heart , the heart changes its color. How do I do just with CSS (Not jQuery) with checking of If Condition this is my Code on View :
<div>
<form method="post" asp-controller="Article" asp-action="AddArticleVote" asp-route-id="@article.Id">
<button type="submit">
<svg xmlns="http://www.w3.org/2000/svg" width="32.044" height="32" viewBox=" 0 32.044 32">
<path id="prefix__comment-heart" d="M18.016 12.16a4.912 4.912 0 0 0-5.664.848 4.8 4.8 0 0 0 0 6.784L16.88 24.4a1.6 1.6 0 0 0 2.272 0l4.528-4.528a4.8 4.8 0 0 0 0-6.784 4.912 4.912 0 0 0-5.664-.928zm3.392 5.376l-3.392 3.392-3.392-3.392a1.6 1.6 0 1 1 2.256-2.272 1.6 1.6 0 0 0 2.272 0 1.6 1.6 0 1 1 2.256 2.272zM18.016 2a16 16 0 0 0-16 16 15.823 15.823 0 0 0 3.617 10.127l-3.2 3.2A1.56 1.56 0 0 0 3.617 34h14.4a16 16 0 1 0 0-32zm0 28.8H7.473l1.488-1.488a1.6 1.6 0 0 0 0-2.256 12.8 12.8 0 1 1 9.055 3.744z" transform="translate(-1.972 -2)" style="fill: #ccc"></path>
</svg>
</button>
</form>
</div>