The content
of the heart::before
selector should be an empty string.
.heart::before {
content:""; <-- this is the answer, same as .hear::after
background-color: pink;
border-radius: 50%;
position: absolute;
width: 50px;
height: 50px;
top: -25px;
left: 0px;