- Solution URL: product-preview-card-with-90-reducibility
- Live Site URL: product-preview-card-component
- Frontend Mentor - @mofada
- Twitter - @im_mofada
I carefully observed the UI draft and found that this line is offset. Is there any way to add an offset to the line-through?
Yes, I find a css property text-decoration-skip-ink
can do this. set
text-decoration-skip-ink: none;
and text-underline-offset: -4px;
to the element. Of course,
you need to set text-decoration: underline;
to the element.
<del class="text-[13px] text-dark-grayish-blue">$169.99</del>