An idea I stole from MDN website 😛 how to setup a fade out for long text in article cards, etc
✨ The trick is to create a psuedo element that is placed in a manner to cover only the last line, and add a horizontal gradient, from full transparent to background color (white)
💡 You could also use CSS custom properties to avoid referring to 1.5rem multiple times
✨ The trick is to create a psuedo element that is placed in a manner to cover only the last line, and add a horizontal gradient, from full transparent to background color (white)
💡 You could also use CSS custom properties to avoid referring to 1.5rem multiple times