.link{ color: #934343; background: radial-gradient(farthest-side at bottom,#6f1b1b,transparent) bottom/calc(2*var(--d, 0%)) var(--d, 0) no-repeat; font-family: 'Viga', sans-serif; font-size: 20px; font-weight: 400; text-transform: capitalize; letter-spacing: 1px; line-height: 18px; display: inline-block; overflow: hidden; transition: all 0.3s; } .link:focus, .link:hover{ --d: 50%; color: #6f1b1b; } @media only screen and (max-width: 767px){ .link{ margin-bottom: 30px; } }