Site logo

Archived topic

Text not wrapping properly on mobile

4 replies · Started by Arie on February 25, 2022

Viewing posts 1–5 of 5

Hi Arie,

The background image you set for the highlighted text can't cover all of the words on mobile as it wraps.

Try add this linedisplay: block; to your CSS:

.has-contrast-color {
    background-color: var(--contrast-hover);
    background-image: linear-gradient(45deg, var(--base), var(--contrast));
    background-size: 100%;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
}

Think I figured it out. Changing display: block; to display: inline-block; seems to have fixed the issue...

Glad you figured it out :)

This archived topic is closed to new replies.